Relative Content

Tag Archive for pythonpandasdataframesorting

How to sort a list in Python to match an Excel Column?

I am trying to get a list of file names to sort with a specific column in Excel which has all the file names in it (though in a different order than file explorer has sorted them). The files are a bunch of images that I need to be sorted so that the data in the Excel matches the picture that is displayed. However, Python seems to only sort the first 10 files correctly then begins to, seemingly randomly, rearrange the last 20 or so file names.