I have the two datasets below and would like to merge them by group in df2. I am not sure how to merge them such that the dates reset for each group (ie. start from the 1st date and end at the last date for each group).
df1:
Date |
---|
2021-01-01 |
2021-01-02 |
2021-01-03 |
df2:
Group |
---|
A |
B |
C |
dfdesired:
Date | Group |
---|---|
2021-01-01 | A |
2021-01-02 | A |
2021-01-03 | A |
2021-01-01 | B |
2021-01-02 | B |
2021-01-03 | B |
2021-01-01 | C |
2021-01-02 | C |
2021-01-03 | C |
any help would be appreciated