question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't convert data with time units to timedeltas by default

See original GitHub issue

Don’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 timedeltas vs datetimes.

xref: https://github.com/pydata/xarray/pull/842#issuecomment-216933269

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shoyercommented, Aug 4, 2016

To answer your original question: yes, separate decode_timedeltasand decode_datetimes options seems like a sane way to handle this.

1reaction
shoyercommented, Aug 4, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found