1note: u can assigne values in each of the common values in the dataframe
2
3df['new_coloum'] = df['coloum'].map({'value_1':1,'value_2':0})
1>>> s.map({'cat': 'kitten', 'dog': 'puppy'})
20 kitten
31 puppy
42 NaN
53 NaN
6dtype: object
7