1,索引转为列,并在原来索引生成正常的数据
df.reset_index(level=0, inplace=True)#索引,列变行
行列转换 用 df.T
data= pd.read_excel('./公共部门.xls',header=3,index_col=3,sheet_name='Data')#社会保护与劳动力.xls #社会发展以进
pd.set_option('display.width', None) # 去列省略
pd.set_option('display.max_rows', None)
第一行,sheet指的是
第二,三,是去掉读取输出的缩写,一般数据太多,会给几个点点