I got a csv that looks something like this:
col1, col2, col3, col4
txt,txt,error,txt
txt,txt,new,txt
txt,txt,new,txt
txt,txt,error,txt
txt,txt,new,txt
txt,txt,fix,txt
Id like to change the order of the rows to this
col1, col2, col3, col4
txt,txt,new,txt
txt,txt,new,txt
txt,txt,new,txt
txt,txt,fix,txt
txt,txt,error,txt
txt,txt,error,txt
so the rows follows news -> change -> error in col3
So far tried different things with:
import pandas as pd
csv_dataframe = pd.read_csv(user_submitted_csv_file)
csv_dataframe = csv_dataframe.sort_values(by=['col3'])
But its not enough since it is not alphabetical nor ascending/descending. also tried things like exstracting the rows -> deleting all rows -> adding back in correct order, but running into problems with that too...