The following is my dataframe which holds values from multiple Excel files. I wanted to do a time series analysis, so I made the index as datetimeindex. But my
datetimeindex
I think you need sort_index:
all_data = all_data.sort_index()