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 ·
4427 阅读 ·
2 评论