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.

datetime64[ns] dtype loses hours, minutes, seconds when uploaded to CARTO

See original GitHub issue

I have a dataset of earthquakes from USGS, and I make sure that the data type for the time column is datetime64[ns] by using pd.to_datetime() and checking the dtypes of the DataFrame. Upon writing the dataset to CARTO, I notice that the hours, minutes, and seconds go missing… hm… 🤔

In the Jupyter notebook, everything looks good:

image

After writing to CARTO, time information goes missing: image

Reading the dataset back into Juypter notebook, the time information is still missing: image

This might just be a CARTO upload problem, but maybe there’s something we can do to fix the data type conversion.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
michellemhocommented, Nov 7, 2017

‘0.2.4b4’

Updating the version… Stay tooned.

0reactions
andy-eschcommented, Nov 9, 2017

\o/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Pandas - How to convert datetime64[ns] and get ...
You can use the dt.time for hours and minutes. ... If you care about the type, you can try remove seconds and use...
Read more >
Time Series / Date functionality
These Timestamp and datetime objects have exact hours, minutes, and seconds , even though they were not explicitly specified (they are 0 )....
Read more >
Type error on using datetime64's microseconds in datetime ...
Using Pandas' datetime64 dtype to convert to a datetime.timedelta ... r : timedelta(hours = r.hour, minutes = r.minute, seconds = r.second, ...
Read more >
News
A figure generated as part of a reprex will be uploaded to imgur, ... At times, it may be relevant to include information...
Read more >
datetime64[ns] format
Xarray uses the numpy dtypes datetime64[ns] and timedelta64[ns] to Time series / date functionality#. Using .merge. day, hour, minute, second, dayofyear, ...
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