pandas dataframe 筛选不取商品类目ID列
时间: 2023-09-09 18:10:12 浏览: 108
好的,您可以使用pandas中的drop函数来删除某一列。具体步骤如下:
1. 先获取到该列所在的位置,也就是列的索引值。
```
index = df.columns.get_loc("商品类目ID")
```
2. 然后使用drop函数删除该列,将axis参数设置为1即可。
```
df.drop(df.columns[index], axis=1, inplace=True)
```
这样就可以实现删除商品类目ID列的操作。希望对您有所帮助!
阅读全文
相关推荐
















