I have a data frame df:
Event Code
Picture no$
Picture value
Picture $
Picture value
Picture no$
Picture value
Picture no$
Picture value
Picture $
Picture value
I want to rename value to reward or no_reward depending on the previous row. If it's $ then reward, if it's no$ then no_reward
What is the best way to do it?
