text_html_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('../input/train.csv', header=0)

df['Gender'] = df['Sex'].map({'female': 0, 'male': 1}).astype(int)

df.head(3)