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:

  1. States with columns dates and statesname
  2. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!