Mapping values
Also: map
Python tools
Replacing values using a dictionary. Anything missing from the dictionary becomes NaN, which works as an alarm.
Exampledf['PaperlessBilling'].map({'Yes': 1, 'No': 0}) turns text into 1/0.
Also: map
Replacing values using a dictionary. Anything missing from the dictionary becomes NaN, which works as an alarm.
Exampledf['PaperlessBilling'].map({'Yes': 1, 'No': 0}) turns text into 1/0.