pandas how to arrange list result in rows and columns code example Example: pandas reorder rows based on column df1.sort_values('9', inplace=True) print (df1)