my dataframe looks like this.
df =
Datecolumn2column3Machine1-jan-2020A2-jan-2020
-
-
-
A
18-jan-2020
A
11-jan-2020
B
12-jan-2020
B
6-feb-2020C7-feb-2020
-
-
-C14-feb-2020C
Date details csv file looks like this
D =
MachineSelected DateA15-jan-2020C12-feb-2020
I need to pick date and machine from the csv file "D" and in dataframe "df" for that machine, i need to extract the last 3 rows from the 'selected date'.
So Outcome should be
Datecolumn2column3Machine13-jan-2020A14-jan-2020
A15-jan-2020A10-feb-2020C11-feb-2020
C12-feb-2020C