简体   繁体   English

在Python中从数据框中删除列

[英]Remove Column from the data frame in Python

I am getting error while trying to remove the column "Unnamed:0" from the data frame. 尝试从数据框中删除“ Unnamed:0”列时出现错误。

Attached the Error File. 附加了错误文件。 Error file 错误档案

This is most probably a mismatch of the actual label string with your input. 这很可能是实际标签字符串与您的输入不匹配。 Try Advertising.columns to get a list of the actual label strings to inspect. 尝试Advertising.columns获取要检查的实际标签字符串的列表。 You can always copy/paste or get the first element from there to be sure you have it right. 您始终可以复制/粘贴或从那里获取第一个元素,以确保您设置正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM