Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
import pandas as pddf = pd.DataFrame({"x": [1, 2, 3, 4, 5], "a": [5, 4, 3, 2, 1]})
df.head()Loading...
df.sort_values("a")Loading...
a = pd.DataFrame({"x": [1, 2, 3, 4, 5], "y": [5, 4, 3, 2, 1]})
a.head()Loading...
a.sort_values("y", inplace=True)
aLoading...