Skip to content Skip to sidebar Skip to footer

Pandas - Sorting A Dataframe By Using Datetimeindex

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 index is not arrange

Solution 1:

I think you need sort_index:

all_data = all_data.sort_index()

Post a Comment for "Pandas - Sorting A Dataframe By Using Datetimeindex"