I'm tring to use infer_freq and asfreq and the return data frame is empty
Original data set:
month interest
0 2004-01 13
1 2004-02 15
2 2004-03 17
3 2004-04 19
4 2004-05 22
Trying to convert the data with different frequency
ice_cream_interest = pd.read_csv('ice_cream_interest.csv')
ice_cream_interest.set_index('month', inplace=True)
ice_cream_interest = ice_cream_interest.asfreq(pd.infer_freq(ice_cream_interest.index))
interest
month
2004-01-01 NaN
2004-02-01 NaN
2004-03-01 NaN
2004-04-01 NaN
2004-05-01 NaN
... ...
2020-04-01 NaN
2020-05-01 NaN
2020-06-01 NaN
2020-07-01 NaN
2020-08-01 NaN