I am trying to merge data frames in python on Fruit, the two tables are below. any suggestions would be great I have tried a variety of things but I cant get it to work. The below two tables are what I currently have.
Thank you in advance.
Table 1:
Fruit | appl | orange | kiwi
Shop | | |
:-----------------------------------:
1 | NaN | 0.275 | NaN
2 | 0.4 | -0.600 | 0.2
3 | 0.7 | NaN | NaN
4 | NaN | NaN | 0.2
5 | 0.3 | 0.350 | NaN
6 | NaN | 0.250 | NaN
7 | NaN | NaN | 0.2
8 | 0.4 | 0.400 | NaN
Table 2:
Fruit | kiwi| orange | appl
:-----------------------------------:
x | 0.4 | 0.275 | 0.2
Final Product:
Fruit | appl | orange | kiwi
Shop | | |
:-----------------------------------:
1 | NaN | 0.275 | NaN
2 | 0.4 | -0.600 | 0.2
3 | 0.7 | NaN | NaN
4 | NaN | NaN | 0.2
5 | 0.3 | 0.350 | NaN
6 | NaN | 0.250 | NaN
7 | NaN | NaN | 0.2
8 | 0.4 | 0.400 | NaN
:-----------------------------------:
x | 0.2 | 0.275 | 0.4