0

I have a dataframe with values, which refer to the index of another Dataframe. If I have two dataframes such as:

index A B
0 1 hello
1 0 bye
2 1 bye
3 2 ready
4 3 hello
index value
0 V
1 W
2 X
3 Y
4 Z

I need to replace values in A by value in Table 2 based on index. Result must be:

index A B
0 W hello
1 V bye
2 W bye
3 X ready
4 Y hello

Any help, please?

Thank you!

0 Answers0