I have a dataframes like
| X | Y |
| ——– | ————– |
|0|1|
|0|125|
|1|65|
|1|59|
|2|28|
and so on and another datframe like
| index | lat | lon |
|:—- |:——:| —–:|
|0|90.0|0.0|
|1|90.0|12.5|
|2|90.0|25.0|
|3|90.0|37.5|
|4|90.0|50.0|
I want to match the first df1[‘X’] column with the second df2[‘index’] and update the first dataframe. My output should look like
| X | lat | lon | Y|
|:—- |:——:| —–:|—–:|
|0|90.0|0.0|1|
|0|90.0|0.0|125|
|1|90.0|12.5|65|
|1|90.0|12.5|59|
|2|90.0|25.0|28|
|..|..|..|
and so on. The two dataframes have different lengths. Any lead?