Don't convert data with time units to timedeltas by default
See original GitHub issueDon’t convert data with time units to timedeltas
by default. Most of the time this behavior is not desirable (e.g: wave period data).
@shoyer suggest:
possibly we should add an explicit toggle for decoding
timedelta
s vsdatetime
s.
xref: https://github.com/pydata/xarray/pull/842#issuecomment-216933269
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do I convert datetime.timedelta to minutes, hours in ...
There's no built-in formatter for timedelta objects, but it's pretty easy to do it yourself: days, seconds = duration.days, duration.seconds ...
Read more >pandas.to_timedelta — pandas 1.5.2 documentation
Convert argument to timedelta. Timedeltas are absolute differences in times, expressed in difference units (e.g. days, hours, minutes, seconds). This method ...
Read more >datetime — Basic date and time types — Python 3.11.1 ...
Only days, seconds and microseconds are stored internally. Arguments are converted to those units: A millisecond is converted to 1000 microseconds. A minute...
Read more >How to Use datetime.timedelta in Python With Examples
Learn how to use time delta in Python. The idiomatic way to add seconds, minutes, hours, days, weeks to datetime objects.
Read more >Source code for timple.timedelta
There are two helper functions for converting between timedelta-like ... E.g. if the interval is 15 and the base unit 'seconds', the locator...
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
To answer your original question: yes, separate
decode_timedeltas
anddecode_datetimes
options seems like a sane way to handle this.It’s too late for v0.8.0, I’m afraid! I already tagged/uploaded the release and am about to send out the announcement.