I merge two datasets using following code:
output1 = classen_gravity.merge(fdi, how= "left", right_on=["Country", "Year", "regime"],
left_on=["country", "regime", "year"])
"regime" is supposed to stay as one column but after a merge, it becomes regime_x and regime_y.
Why would it happen?
Make sure that the order of the columns is the same:
To avoid problems with the column naming, it's best to impose uniform naming: