I have some percentages in a data frame column
pc
0.32
0.45
0.49
0.60
0.68
0.87
And i want to end up with something like this
pc group
0.32 1
0.45 2
0.49 2
0.60 2
0.68 3
0.87 3
I've tried
df["group"]=3
if df["pc"]<0.66:
df["group"]=2
elif df["pc"]<0.33:
df["group"]=1
but all i get is
ValueError: The truth value of an array with more than one element is ambiguous.
Any ideas?