1

I’m using Pandas to import data from a csv. One of the columns is datetime. I'm using...

datetime = ['datetime']
df= pd.read_csv(File, parse_dates=datetime)

...to import the datetime column as "datetime64[ns]", which according to...

df.info()

...is in the correct format. However, when i plot against the "datetime" column it looks like this:

enter image description here

When it should be looking like this (this is how it looks when I'm working directly with the same data directly extracted from SQL).

enter image description here

I assume the datetime column is still not quite in the correct dtype (even though it states it is datetime64[ns]).

What should i do to ensure that the 1st plot looks like the 2nd?

Mark
  • 109
  • 5

0 Answers0