I have data that I have grouped by two columns and subtotaled. I used .loc to separate the child group and pd.merge to add each as a column with the totals for the parent g