So I have an excel spreadsheet that has a specific column I want to sort the spreadsheet by. The column has 3 different combinations of starting letters, B,C,E. I want to order by B then E then all the rows starting with C. I do need to sort the whole table from the column
Anyone know how to do this in Python?
Read your sheet into a list of rows
lst, the column index of your specific column beingindex.The
[0]in the last line accesses the first character of your field, which is looked up in a dictionary then. The default value of 4 in thedict.getarguments puts all not fitting lines to the end of your new list. Not tested in detail, but should get you the idea.