Skip to content
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

BUG: fix PeriodIndex.difference producing incorrect results #60992

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chilin0525
Copy link
Contributor

@@ -534,6 +534,22 @@ def shift(self, periods: int = 1, freq=None) -> Self:
)
return self + periods

def _convert_can_do_setop(self, other):
try:
if isinstance(other, Index):
Copy link
Member

Choose a reason for hiding this comment

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

A lot of this can be outside a try/except

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jbrockmendel Thank you for the review, but before submitting the revision, I would like to confirm with you whether you think this modification direction is correct.

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

Successfully merging this pull request may close these issues.

BUG: Index.difference is returning too many values
2 participants