Why we put only single square brackets while dropping column in Pandas?

后端 未结 0 741
长发绾君心
长发绾君心 2020-12-14 12:52

Whenever we are dropping two column in a dataframe, we enclose the column names with a single square bracket. Below is the code:

df.drop(columns=[\'first\',\'last\'],

相关标签:
回答
  • 消灭零回复
提交回复
热议问题