I have the dataframe df1 as
Userid timestamp pnl_of_fills variation
111 1.643955e+09 20.00 bad
122 1.643955e+09 2.67 good
221 1.643955e+09 3.33 good
2735 1.643955e+09 6.60 good
31124243 1.643955e+09 40.00 bad
which was created with groupby Userid in pandas dataframe.
and df2 as
Userid
0 111
1 122
2 221
3 2735
4 111
I need new dataframe with combine df1 and df2 as df3
df3 like
Userid pnl_of_fills Variation
0 111 20.00 bad
1 122 2.67 good
2 221 3.33 good
3 2735 6.60 good
4. 111 20.00 bad
Have tried multiple approaches and didnt find anything useful.
Basically for every value of df2 column, the df1 values needs to be updated.