📅  最后修改于: 2022-03-11 14:58:10.508000             🧑  作者: Mango
import pandas as pd
file = open("your.csv", "r")
data = pd.read_csv(file, sep = ",")
gender = {'male': 1,'female': 0}
data.Gender = [gender[item] for item in data.Gender]
print(data)