Hi I have a Dataframe with 3 columns as below.
I would like to calculate the earliest "Start Date" for each Employee_ID using Python Pandas
.
e.g.
for Employee_ID SNC1289037
, Start_Date will be 1/1/2020
and End_Date will be 12/31/2999
, as there are no breaks in the time periods.
for Employee_ID SNC2289038
, Start_Date will be 3/1/2020 and End_Date will be 12/31/2999, as there is a break in the time period.
Employee_ID|Start_date | End_date
---------------------------------
SNC1289037 1/1/2020 1/31/2020
SNC1289037 2/1/2020 2/29/2020
SNC1289037 3/1/2020 3/30/2020
SNC1289037 4/1/2020 12/31/2999
SNC2289038 1/1/2020 1/31/2020
SNC2289038 3/1/2020 3/30/2020
SNC2289038 4/1/2020 12/31/2999
SNC4589038 1/1/2020 1/31/2020
SNC4589038 2/1/2020 2/29/2020
SNC4589038 3/1/2020 3/30/2020
Thank you very much for your help.