text_plain_output_1.png image_output_1.png
import numpy as np

import pandas as pd

dataset = pd.read_csv('../input/Mall_Customers.csv')
pd.set_option('display.max_columns', 10)

print(dataset['Gender'].unique())
dataset['Gender_code'] = np.where(dataset['Gender'] == 'Male', 1, 0)