2019-07-02
阅读量:
550
如何删除指定列名的列
示例#:删除列名称的列
在他的代码中,使用列名删除Passed列。axis
参数保持为1,因为1表示列。
# importing pandas module
import pandas as pd
# making data frame from csv file
data = pd.read_csv("nba.csv", index_col ="Name" )
# dropping passed columns
data.drop(["Team", "Weight"], axis = 1, inplace = True)
# display
data






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论