Python Merge 2 excel table in row, with not unique key
you can try pd.concat to combine them.
May I know how to merge 2 excel into 1 like this in python.
I've tried Pandas to merge it by "name" and keep the sequence "index", but no luck. as there are more than 1 location. so, the result should have 2or more location in row.
Many thanks




index
name
price




1
apple
2


2
orange
3


3
grape
7


4
banana
1


5
kiwi
2.5


6
lemon
1







index
name
location




1
apple
US


2
apple
UK


3
banana
Columbia


4
banana
Costa Rica


5
kiwi
Italy


6
lemon
US







index
name
price
location_1
location_2




1
apple
2
US
UK


2
orange
3
N/A
N/A


3
grape
7
N/A
N/A


4
banana
1
Columbia
Costa Rica


5
kiwi
2.5
Italy



6
lemon
1
US