I have a data frame (df1) like this:
           X        Y
1          200.0    50            
2          200.1    57    
3          200.2    69
4          200.3    77
5          200.5    84
6          200.6    93
and I have another data frame (df2) like this:
           X
1          200.0                
2          200.5    
I want to extract the Y-values of df1 which match to the X-Values of df2 into the df2 that it looks like this:
           X        Y
1          200.0    50                 
2          200.5    84
How can I solve this problem for example with pandas and numpy ? Unfortunately I'm quite new in python and I have no idea.
Thank you.
Best Regards, DocSnyda
 
    