How to set values in a dataframe column that depends if another column value is bigger than a dict/lookup table
I have a dataset with date and id columns, and I want to set a third column ‘Status’ where if the date is before the value in the dict/lookup table, then ‘On’, ‘Off’ if on or after the date.