私信  •  关注

Yogesh Patel Rishabh Bhandari

Yogesh Patel Rishabh Bhandari 最近创建的主题
Yogesh Patel Rishabh Bhandari 最近回复了
6 年前
回复了 Yogesh Patel Rishabh Bhandari 创建的主题 » Drop函数不处理python的数据帧[duplicate]

这个 drop 通常不会产生 SettingWithCopyWarning .
但有可能 dataframe 你得到的是通过切片动态生成的。

在这种情况下,请尝试以下操作:

data_new = data.drop('columnname', axis= 1)