I have:
df=pd.DataFrame({'col1':['x','x','x','x','x','y','y','y','y','y','y','y'],
'value':[0,0,0,0,0,0,0,0,0,0,0,0]})
I would like:
the value
column to increase by a constant value depending on the number of times it appears in col1
. for each occurrence of x
, it increases by 100, and for each occurrence of y
it increases by 150