成功解决AttributeError: ‘Series‘ object has no attribute ‘name’
成功解决AttributeError: 'Series' object has no attribute 'name’
解决问题
AttributeError: 'Series' object has no attribute 'name’
解决思路
属性错误:'Series'对象没有属性' name '
解决方法
将pandas.core.series.Series格式转为pandas.core.frame.DataFrame格式,然后再切片,即可!
df = df.to_frame()
赞 (0)