Pandas使用(一)–按列对dataframe排序 python复现excel function dataframe排序问题 // ascending默认参数为True,表示升序;False表示降序 df=df.sort_values(by='列名',ascending=True) 上述code实现对dataframe某列进行排序的功能。