Pandas sortieren Spalten nach Namen
df = df.reindex(sorted(df.columns), axis=1)
Crowded Crossbill
df = df.reindex(sorted(df.columns), axis=1)
DataFrame.sort_values(
['column_to_sort_by'],
axis=0,
ascending=True,
inplace=False,
kind='quicksort',
na_position='last',
ignore_index=False,
key=None
)
>>> result = df.sort(['A', 'B'], ascending=[1, 0])
df.sort_index(axis=1)