API/DES: Non-Nanosecond Tracker
See original GitHub issueSupport for non-nanosecond timedelta64, datetime64, and datetime64tz is coming along. The next big planned steps are to get the Timedelta and Timestamp scalars to support non-nano resolutions. There are a few design options that I’d like to get input on cc @pandas-dev/pandas-core
I’m doing Timedelta first mostly because that is more conducive to doing as a scoped PR with dedicated testing. Current plan is to make a dedicated constructor like Timedelta._from_value_and_reso (so i can write tests) that can can be removed once we decide on the public behavior. Which brings us to the questions:
- Do we add a reso-like keyword to the constructors? Or use/respect “unit”?
- With non-nano np.timedelta64 objects that don’t overflow when cast to nano, do we still cast? e.g. does `np.datetime64(4, “s”) become ns or stay s?
- Similar with pytimedelta.
pd.Timedelta(timedelta(days=106752))
currently raises, in the future will presumably come back with a ‘us’ reso. So what about currently non-raising cases likepd.Timedelta(timedelta(days=106751))
? Does it stay ns or become us?
Other
- What happens to (class attributes) (Timestamp|Timedelta)(min|max|resolution)?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top Results From Across the Web
API/DES: Non-Nanosecond Tracker · pandas-dev ... - GitHub
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, ...
Read more >Bug Report: Can't install homeassistant-supervised.deb
API/DES : Non-Nanosecond Tracker, 10, 2022-03-31, 2022-09-25. No way to change dwClsContext parameter to CoCreateInstance, 1, 2020-12-21, 2022-11-02.
Read more >Untitled
Find a one-night stand or a hookup you can also hang out with. Which dating site is best for serious relationships? What is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I’m not missing anything, the only user code that could “break” with what you propose is if the user has code creating second precision datetime data, which currently breaks, and after your changes would work.
Personally I think:
If I’m not missing something, I’d personally add this directly without overcomplicating things.
Status Update 2022-06-20. The constructors point is the one the most pressing.