I have 1 DF w/ the first and last date of the games for each NBA team. I have another DF w/ the ELO of the team before and after each game. I would like to add 2 columns to DF1 w/ the ELO of the team and at the first and last dates specified. For dates in the first column, I would like ELO1 and dates in the second column I would like ELO2. It's even better if there's some way to get the difference between the 2 ELO's directly into 1 column since that is what I'll be computing eventually.
DF1:
first last
team
ATL 2017-10-18 2018-04-10
BOS 2017-10-17 2018-04-11
BRK 2017-10-18 2018-04-11
CHI 2017-10-19 2018-04-11
[...]
DF2:
date team ELO_before ELO_after
65782 2017-10-18 ATL 1648.000000 1650.308911
65783 2017-10-17 BOS 1761.000000 1753.884111
65784 2017-10-18 BRK 1427.000000 1439.104231
65785 2017-10-19 CHI 1458.000000 1464.397752
65786 2018-04-10 ATL 1406.000000 1411.729285
[...]
Thanks in Advance!
Edit - The resulting data frame I want would look like:
DF3:
first last ELO_before ELO_after
team
ATL 2017-10-18 2018-04-10 1648.000000 1411.729285
BOS 2017-10-17 2018-04-11 1761.000000 [Elo2 for last game]
BRK 2017-10-18 2018-04-11 1427.000000 [Elo2 for last game]
CHI 2017-10-19 2018-04-11 1458.000000 [Elo2 for last game]