Skip to content
Advertisement

Tag: natsort

Naturally sorting Pandas DataFrame

I have a pandas DataFrame with indices I want to sort naturally. Natsort doesn’t seem to work. Sorting the indices prior to building the DataFrame doesn’t seem to help because the manipulations I do to the DataFrame seem to mess up the sorting in the process. Any thoughts on how I can resort the indices naturally? Answer If you want

Advertisement