def normalize(df, from_joint):
    df.drop(['header', 'pose', from_joint], axis=1, level='joint').sub(df[
        from_joint], level=1)
df.update(normalize(df, 'torso'))
Python: нормализация некоторых столбцов DataFrame pandas