Sorting alphabetically using pandas

42 views Asked by At

How can I sort a csv file using pandas so that the names are sorted the same way finder does it?

In finder I have millions of files named as such: "-2odhDKSZ22302_000.jpg". These file names are also in a csv. I'd like to be able to go through the images via finder and the csv file in the same order.

If there are differences in how other operating systems (e.g. Ubuntu) sort file names could you please point this out.

Update: sort_values() has a key argument, if I knew what the default method of sorting was for the operating systems then I could match them up.

I've tried searching on stack sites but can't find what I'm looking for.

0

There are 0 answers