python df.reset_index报错AttributeError: ‘NoneType‘ object has no attribute ‘reset_index‘
python dataframe reset_index()报错
今天用python给df重排index时,报错
AttributeError: 'NoneType' object has no attribute 'reset_index'
我的df中某些列有None,在进行下面这句话时,报错
df.sort_values(['datatime'],inplace=True).reset_index(drop=True)
修改为两句话就不报错了
df.sort_values(['datatime'],
原创
2022-01-10 18:36:40 ·
4803 阅读 ·
2 评论