sortować ramkę danych według kolumny
df.sort_values(by='col1', ascending=False)
Magnificent Moth
df.sort_values(by='col1', ascending=False)
# Python, Pandas
# Sorting dataframe df on the values of a column col1
# Return sorted array without modifying the original one
df.sort_values(by=["col1"])
# Sort the original array permanently
df.sort_values(by=["col1"], inplace = True)
df = df.reindex(sorted(df.columns), axis=1)
df = df.reindex(sorted(df.columns), axis=1)
>>> result = df.sort(['A', 'B'], ascending=[1, 0])