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: always strip .freq when putting DTI/TDI into Series/DataFrame #41425

Merged
merged 5 commits into from
May 17, 2021

Conversation

jbrockmendel
Copy link
Member

ATM when we put a DatetimeArray/TimedeltaArray/DatetimeIndex/TimedeltaIndex (from here on, just "DTI") into a Series or DataFrame, we drop its .freq for BlockManager-DataFrame cases, but not the other three cases (BlockManager-Series, ArrayManager-DataFrame, ArrayManager-Series).

The long-term behavior is definitely going to always drop the freq (more specifically, DTA/TDA won't have freq, xref #31218). So this PR standardizes always-dropping.

cc @mroeschke this should unblock your window PR

cc @jorisvandenbossche bc this touches ArrayManager

@jreback jreback added the Datetime Datetime data dtype label May 17, 2021
@jreback jreback added this to the 1.3 milestone May 17, 2021
@jreback
Copy link
Contributor

jreback commented May 17, 2021

looks fine, can you rebase & add a user facing note. ping on green.

@jbrockmendel
Copy link
Member Author

ping

@jreback jreback merged commit d733368 into pandas-dev:master May 17, 2021
@jbrockmendel jbrockmendel deleted the bug-am-dta-freq branch May 17, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants