I have a data frame indexed with a date (Python datetime object). How could I find the frequency as the number of months of data in the data frame?
I tried the attribute data_frame.index.freq
, but it returns a none value. I also tried asfreq
function using data_frame.asfreq('M',how={'start','end'}
but it does not return the expected results. Please advise how I can get the expected results.