I have dataset and it contains Age column. with different values. For example,
Age |
---|
12 |
28 |
11 |
7 |
42 |
I was trying to change all values more than 1 and less than 15 so I did this:
for i in df_age:
if (df_age[(df_age['Age'] > 1)&( df_age['Age'] <15 )]):
df_age.loc[i,'Age'] = "Kids"
But i got error:
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
any idea how to solve it?