ENH/WIP: resolution inference in pd.to_datetime, DatetimeIndex by jbrockmendel · Pull Request #55901 · pandas-dev/pandas (original) (raw)
- closes ENH: Support for non-nanosecond resolution in read_csv and to_datetime #54048
- closes BUG: Inconsistent datetime conversion behavior when constructing a DataFrame with Python datetimes. #55014
- closes ENH: Support non-nano inference in to_datetime #55096
- closes BUG: Assignment of Timestamp Scalar uses micrsosecond precision, Series uses nano #55487
- closes ENH/API: resolution inference in vectorized datetime parsing #55564
- closes BUG: Inconsistent datetime dtype precision with assign() using list vs direct value #56733
- closes BUG: Inconsistent resolution from constructing with and assigning datetime values #57080
- closes BUG: Out of bounds nanosecond timestamp when s was specified #57349
- closes BUG: Series constructor loses date unit of Timestamps #58300
- Tests added and passed if fixing a bug or adding a new feature
- All code checks passed.
- Added type annotations to new arguments/methods/functions.
- Added an entry in the latest
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.
This is an API change so will have to wait for 3.0, posting it to get feedback on desired API in mostly-IO places where this causes API changes.
This does not yet handle Timedelta scalar, TimedeltaIndex, or pd.to_timedelta. I'd like to get those done for 3.0 but its a much lower priority than the datetime side.
I've been splitting things off to reduce the diff, will try to keep doing that. Open to suggestions for splittable components. Currently #55741 has some of the cython implementation.
19 tests are failing locally. 11 of those are stata tests that would be addressed by #55642. 4 are SAS and have a similar option available. One is in JSON and may be hard to solve, xref #55827. The rest are caused by #55737.