sa 11 ip chapter 11

19. Consider following code that creates two dataframes :

import pandas as pd, numpy as np ore1 = pd.DataFrame(np.array([[20,35,25,20], [11,28,32,20]]), columns = [ ‘ iron’, ‘magnesium’, ‘copper’,’silver’]) ore2 = pd.DataFrame(np.array([[14,34,26,26], [33,19,25,23]]), columns = [‘iron’, ‘magnesium’, ‘gold’,’silver’]) (a) print(ore1 + ore2) ore3 = ore1.radd(ore2) print(ore3) # both will be same # Output iron copper gold iron magnesium silver 0 NaN NaN NaN NaN 69 46

19. Consider following code that creates two dataframes : Read More »