How to insert a row into a multiindex dataframe so that rows sum to the total?
How to insert a row into a multiindex dataframe so that rows sum to the total? Question: I have a multi index dataframe that I want to insert a row into. >>>import numpy as np >>>import pandas as pd >>> date = pd.date_range(‘2023-01-01’, periods=3) >>> size = [‘s’,’m’,’total’] >>> arrays = [date, size] >>> index …