Skip to content

(Series|DataFrame) datetimelike ops #18270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Nov 13, 2017 · 1 comment
Closed

(Series|DataFrame) datetimelike ops #18270

jbrockmendel opened this issue Nov 13, 2017 · 1 comment
Labels
API Design Datetime Datetime data dtype

Comments

@jbrockmendel
Copy link
Member

There are a bunch of GH issues relating to arithmetic ops with datetimelike objects behaving unexpectedly when boxed in a (Series|DataFrame). For the issues I have in mind (I'll collect a list later), the operation works as expected when done on a (DatetimeIndex|TimedeltaIndex|PeriodIndex).

The relevant (Series|DataFrame) operations are defined in core.ops. The DatetimeIndex (et al) ops are defined in core.indexes.datetimelike.DatetimeIndexOpsMixin. With a little gumption the relevant ops can be taken out of DatetimeIndexOpsMixin and made into (Index|Series|DataFrame)-agnostic classes TimestampVector, TimedeltaVector, PeriodVector.

Would it be feasible/desirable to have appropriately-dtyped (Series|DataFrame) methods dispatch to these implementations?

@gfyoung gfyoung added Datetime Datetime data dtype API Design labels Nov 16, 2017
@jbrockmendel
Copy link
Member Author

Related #9859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

2 participants