to_frame() 问题发现: 获得的数据形式如下,需要将其转换成Dataframe形式 type(df) # pandas.core.series.Series 问题解决: 只需: df1 = df.to_frame() 便可以获得dataframe形式