Py学习  »  Python

Drop函数不处理python的数据帧[duplicate]

sourav agarwal • 4 年前 • 1142 次点击  

这个问题已经有了答案:

df.drop(['column_name'],axis=1,inplace=True)

给予

"Warning (from warnings module):
  File "/home/sourav/.local/lib/python3.5/site-packages/pandas/core/frame.py", line 3697
    errors=errors)
SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy"
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/49692
 
1142 次点击  
文章 [ 3 ]  |  最新文章 4 年前