pandas reorder columns by index alphabetically code example Example: how to sort index pd.sort_index()