import pandas as pd import numpy as np df1 = pd.DataFrame(np.array([['a', 5, 9], ['b', 4, 61], ['c', 24, 9]]), columns = ['name', 'attr11', 'attr12']) df2 = pd.DataFrame(np.array([['a', 5, 19], ['b', 14, 16], ['c', 4, 9]]), columns = ['name', 'attr21