📌  相关文章
📜  将列转换为二进制 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:10.508000             🧑  作者: Mango

代码示例2
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)