Skip to content

REF: change TDI.delete behavior to match DTI.delete #30655

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 3 commits into from
Jan 4, 2020

Conversation

jbrockmendel
Copy link
Member

With this change, the two methods behave the same and can be shared.

@TomAugspurger
Copy link
Contributor

Whats the behavior change between "infer" and None?

@jbrockmendel
Copy link
Member Author

Whats the behavior change between "infer" and None?

tdi = pd.TimedeltaIndex(["1 Day", "2 Days", None, "3 Days", "4 Days"])

>>> tdi.delete(2).freq
None   <-- PR
<Day>  <-- master

@jreback jreback added Index Related to the Index class or subclasses Timedelta Timedelta data type labels Jan 4, 2020
@jreback jreback added this to the 1.0 milestone Jan 4, 2020
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.

can you add a test that hits this

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.

lgtm. ping on green.

@jbrockmendel
Copy link
Member Author

ping

@jreback jreback merged commit b29d58d into pandas-dev:master Jan 4, 2020
@jbrockmendel jbrockmendel deleted the ref-delete branch January 4, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants