I have a dataset with several columns, and I would like to iterate over every value in one specific column called "date", and update the value if the value meets a condition. This is what I have right now:
for element in df['date']:
    if element > 2000.0:
        element = element - 2400.0
    elif element < -2000.0:
        element = element + 2400.0
This obviously doesn't work, but what can I do to fix this?
Edit: Thanks for all the replies!
 
     
     
     
    