Skip to content

ENH: Timestamp.tz_localize support non-nano #47355

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 8 commits into from
Jun 15, 2022

Conversation

jbrockmendel
Copy link
Member

Sits on top of #47346

Not sure why the .github files are in the diff, they don't show up in the diff locally

jbrockmendel and others added 8 commits June 14, 2022 09:28
…das-dev#47331)

* REGR: concat not sorting columns for mixed column names

* Fix none in columns

* BUG: concat not sorting column names when None is included

* Update doc/source/whatsnew/v1.5.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* Add gh reference

Co-authored-by: Matthew Roeschke <[email protected]>
* Add run-tests action

* Fix

* Fix

* Fix

* Update macos-windows.yml

* Update posix.yml

* Update python-dev.yml

* Update action.yml

* Update macos-windows.yml

* Update posix.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

I forgot if we discussed this prior, but what about frequencies larger than seconds? (day, hour, seconds)

I imagine those larger frequencies might cause problems here.

@jbrockmendel
Copy link
Member Author

yah ATM we support s, ms, us, ns, raise on the other resos. We could in principle support some of the others but im not aware of much demand for those, and they would impose other complications

@mroeschke
Copy link
Member

Okay good to know. At what codepath would those larger frequencies raise?

Curious because it would be nice to specifically raise in tz_localize/tz_convert that freq >= minute is not supported because DST is hard.

@jbrockmendel
Copy link
Member Author

Okay good to know. At what codepath would those larger frequencies raise?

In the constructor Timestamp._from_value_and_reso, though looks like I was wrong and minutes is allowed. will change that in an upcoming PR (also Timedelta allows a bunch more resos that ill probably disable)

@mroeschke mroeschke added Timezones Timezone data dtype Non-Nano datetime64/timedelta64 with non-nanosecond resolution labels Jun 15, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jun 15, 2022
@mroeschke mroeschke merged commit 18124f9 into pandas-dev:main Jun 15, 2022
@jbrockmendel jbrockmendel deleted the nano-localize branch June 15, 2022 22:51
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* ENH: Timestamp +- timedeltalike scalar support non-nano

* ENH: Timestamp.__sub__(datetime) with non-nano

* better exception message

* BUG: concat not sorting mixed column names when None is included (pandas-dev#47331)

* REGR: concat not sorting columns for mixed column names

* Fix none in columns

* BUG: concat not sorting column names when None is included

* Update doc/source/whatsnew/v1.5.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

* Add gh reference

Co-authored-by: Matthew Roeschke <[email protected]>

* Add run-tests action (pandas-dev#47292)

* Add run-tests action

* Fix

* Fix

* Fix

* Update macos-windows.yml

* Update posix.yml

* Update python-dev.yml

* Update action.yml

* Update macos-windows.yml

* Update posix.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* Update python-dev.yml

* ENH: Timestamp pickle support non-nano tzaware (pandas-dev#47340)

* ENH: Timestamp.tz_localize support non-nano

Co-authored-by: Patrick Hoefler <[email protected]>
Co-authored-by: Matthew Roeschke <[email protected]>
Co-authored-by: Jonas Haag <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Non-Nano datetime64/timedelta64 with non-nanosecond resolution Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants