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