pandas sort row by column code example
Example 1: sorting rows and columns in pandas
df.sort_values(by="ColumnName", axis=0, ascending=False, inplace=False, kind='quicksort')
#axis 0 is rows and axis 1 is columns. For axis 0 by needs to contain column name
Example 2: dataframe sort by column
sorted = df.sort_values('column-to-sort-on', ascending=False)
#or
df.sort_values('name', inplace=True)