I have 2 dataframes:
Country electricity price
23 Pakistan 0.042
24 Afghanistan 0.042
25 Argentina 0.042
26 Sri Lanka 0.043
27 Egypt 0.043
and
Country Meal, Inexpensive Restaurant Cappuccino (regular)
0 Afghanistan 1.70 1.08
1 Aland Islands 12.15 3.53
2 Albania 4.31 1.10
3 Alderney 21.61 3.41
4 Algeria 2.13 0.57
Afghanistan is the common row
I wanted to join them so I used
a1.join(b1,on='Country')
. However, it keeps showing the value error:
ValueError: You are trying to merge on object and int64 columns. If you wish to proceed you should use pd.concat
I have checked the type of data in country it is string, and there is no null values that might have confused it.. any idea what could be the cause to such an issue ?