Delete pandas column with no name [duplicate]

This question already has an answer here:

I know to delete a column I can use df = df.drop('column_name', 1), but how would I remove a column just by indexing which column it is? As in without inserting the name?

Sorry if this question has been repeated I can’t seem to find it

Comments 1

发表评论

电子邮件地址不会被公开。 必填项已用*标注