Efficient calculation on a pandas dataframe,"C = pd.merge(C, B, on=['Marca', 'Formato'])"