I want to plot one month of data [one data per hour. the dataset is over one year]. why is this code not working?
df_pv["Zeit"] = pd.to_datetime(df_pv["Zeit"])
df_pv["Zeit"].min(), df_pv["Zeit"].max()
[Out] (Timestamp('2020-01-01 01:00:00'), Timestamp('2020-12-31 00:00:00'))
df_pv.set_index("Zeit")
df_pv['2020-04-01 01:00:00':'2020-04-30 01:00:00'].plot()
Error message:
"TypeError: cannot do slice indexing on RangeIndex with these indexers [2020-01-01 01:00:00] of type str"
thanks a lot!!