I wanted to assign 0,1,2,3 numeric values in my existing dataframe. Following is my code: for i in train_df[\'age\']:
train_df[i].values[0:30] = 0 train_df[i].val