I have a DataFrame:
Seasonal
Date
2014-12 -1.089744
2015-01 -0.283654
2015-02 0.158974
2015-03 0.461538
I used a pd.to_period in the DataFrame, so its index has turned into a Pandas period type (type 'pandas._period.Period').
Now, I want to turn that index to strings. I'm trying to apply the following:
df.index=df.index.astype(str)
However that doesn't work...
ValueError: Cannot cast PeriodIndex to dtype |S0
My code has been frozen since then.
S.O.S.