import pandas as pd
data = pd.read_excel('nt.xlsx')
# 删除数据用drop
# labels 指定删除的列或者行名称
# axis = 0 删除行
# axis = 1 删除列
# inplace = True 替换原来数据
data1 = data.drop(labels=['age','sex'], axis=1, inplace=True)
import pandas as pd
data = pd.read_excel('nt.xlsx')
# 删除数据用drop
# labels 指定删除的列或者行名称
# axis = 0 删除行
# axis = 1 删除列
# inplace = True 替换原来数据
data1 = data.drop(labels=['age','sex'], axis=1, inplace=True)