社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

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

sourav agarwal • 4 年前 • 1106 次点击  

这个问题已经有了答案:

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
 
1106 次点击  
文章 [ 3 ]  |  最新文章 4 年前