After renaming a DataFrame\'s column(s), I get an error when merging on the new column(s):
DataFrame
import pandas as pd df1 = pd.DataFrame({\'a\': [1, 2
Replaced the code tmp.columns = [['POR','POR_PORT']] with tmp.rename(columns={'Locode':'POR', 'Port Name':'POR_PORT'}, inplace=True) and it worked.
tmp.columns = [['POR','POR_PORT']]
tmp.rename(columns={'Locode':'POR', 'Port Name':'POR_PORT'}, inplace=True)