标签:index 排序 pandas bsp imp sha .so and axis
按索引排序
import tushare as ts
import pandas as pd
data=ts.get_hist_data(‘600848‘)
#默认索引升序
data=data.sort_index()
#索引降序排序
data=data.sort_index(axis=1,ascending=Flase)
#值排序
data=data.sort_values(by=‘close‘)
标签:index 排序 pandas bsp imp sha .so and axis
原文地址:https://www.cnblogs.com/thechain/p/9218953.html