二分赋值法: data["Sex"]=(data["Sex"]=="male").astype("int")

data.loc[:,"Sex"]所有的行 全Sex列

data.loc[:,3]所有的行 错误写法

data.iloc[:,3]第三列