How can I check if a Pandas dataframe’s index is sorted

How about:

df.index.is_monotonic

Leave a Comment