To assign a range of values as 0 or 1 in an existing dataframe

前端 未结 0 1296
悲哀的现实
悲哀的现实 2021-02-09 08:12

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         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题