binary_cols = ['Partner', 'Dependents', 'PhoneService', 'PaperlessBilling', 'Churn'] for col in binary_cols:     df[col] = df[col].map({'Yes': 1, 'No': 0})