0

I converted a datetime64 column in my dataset to an index. I tried to use it to plot boxplot by month and another one by years. I wasn't able to do it because it appeared that the type of the index is M8[ns]. I tried to change it to datetime64[ns] but it is not possible.

I would appreciate some help here.

data.index.year 

does not work

Yana
  • 785
  • 8
  • 23
  • check this might help https://stackoverflow.com/questions/29206612/difference-between-data-type-datetime64ns-and-m8ns , It is good if you could share sample of your data frame and what you did will help to solve it more precisely than generic answer – nithin Nov 18 '19 at 09:36
  • Thank you. I compared the types and my machine says they are equal. In this case, I guess I have to check why the year extraction does not work here. – Yana Nov 18 '19 at 09:45

0 Answers0