def add_totals_to_dataframe(df, row_name="Row total", col_name="Column total"):
    """Add row and column totals to dataframe"""
    df.loc[row_name]= df.sum(numeric_only=True, axis=0)
    df.loc[:,col_name] = df.sum(numeric_only=True, axis=1)
    return df