📅  最后修改于: 2022-03-11 14:45:19.878000             🧑  作者: Mango
df.A=pd.Categorical(df.A,categories=['July', 'August', 'Sept'])
df=df.sort_values('A')
df
Out[310]:
A B
1 July 3
0 August 2
2 Sept 6