Suppose I have the following dataframe
import pandas as pd df = pd.DataFrame( {3: {0: \'Total shareholders’ equity, beginning balances\', 1: \'Total sharehold