I tried to export a DatetimeIndexResampler with the dataframe.to_csv("name.csv") method but it doesn't work with this kind of data. Here's the code i'm having difficulties with:
data_perc = data.copy().pct_change().dropna() * 100
data_1 = data_perc["Close"].resample("A")
data_1.to_csv("Pct_change.csv")
I get the error: "'DatetimeIndexResampler' object has no attribute 'to_csv'", but i don't know what method i should use instead of df.to_csv.