Question: I have two dataframes: States with columns dates and statesname Season with columns state name, seasonname and dates Under season name I have two types
I have two dataframes:
- States with columns dates and statesname
- Season with columns state name, seasonname and dates
Under season name I have two types of variable. It is either season started or season ended.
If not in pair it means I have started and ended date is today as it is ongoing.
I want to write a function that creates a new column in States stating season started or ended by checking if States.statesname= Season.statesname if yes then it should also check if date falls in the ranges of season started to season ended
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
