SyntaxFix
Write A Post
Hire A Developer
Questions
.apply() takes in a function as the first parameter; pass in the label_race function as so:
.apply()
label_race
df['race_label'] = df.apply(label_race, axis=1)
You don't need to make a lambda function to pass in a function.