Skip to content

REF: Avoid dispatching Series ops to pd.Index #27268

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

Merged
merged 4 commits into from
Jul 8, 2019

Conversation

jbrockmendel
Copy link
Member

We have some semi-circular dispatch logic between non-EA Series and pd.Index ops. This avoids that circularity by implementing the relevant logic directly in the Series implementation. After this I'm going to start migrating the Index implementations to use the Series implementation, after which we will have One True Implementation (also have to migrate RangeIndex and IntegerArray implementations)

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment, otherwise lgtm.

orig_right = right
if is_scalar(right):
# broadcast and wrap in a TimedeltaIndex
# TODO: possible perf improvement by using NaTD scalar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this this is a worthwhile comment here as NaTD is not likely to happen

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a decent chance we'll implement it for internal use to de-duplicate logic like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed comment

@jreback jreback added Clean Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Timedelta Timedelta data type labels Jul 6, 2019
@jreback jreback added this to the 0.25.0 milestone Jul 8, 2019
@jreback jreback merged commit 1d92c77 into pandas-dev:master Jul 8, 2019
@jreback
Copy link
Contributor

jreback commented Jul 8, 2019

thanks

@jbrockmendel jbrockmendel deleted the mops2 branch July 8, 2019 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants