-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: remove kwargs from Index._simple_new #29604
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -406,6 +406,12 @@ def intersection(self, other, sort=False): | |
""" | ||
return super().intersection(other, sort=sort) | ||
|
||
@Appender(Index.difference.__doc__) | ||
def difference(self, other, sort=None): | ||
new_idx = super().difference(other, sort=sort) | ||
new_idx.freq = None | ||
return new_idx | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could this be shared in one of the datetimelike classes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so: PeriodIndex doesn't allow My motivation with this is getting kwargs out of a basic method and make child classes just build on that using |
||
|
||
def _wrap_joined_index(self, joined, other): | ||
name = get_op_result_name(self, other) | ||
if ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a docstring here? (I think you can use one of the decorators to append
Index.difference.__doc__
)(and same below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added.