My input dataframe looks like:-
St | sgmt | family | type | Val1 | Val2 | Val3
Closed common pension indv 32 33 34
Closed common pension fam 30 29 28
Closed common pension oth 10 20 30
My output dataframe should be like:-
Col | Val1 | Val2 | Val3
Closed total 72 82 92
-Common total 72 82 92
--Pension total 72 82 92
---indv 32 33 34
---fam 30 29 28
---oth 10 20 30
72,82,92 are sum of columns respectively.
I am stuck and don't know how to proceed. Please help 🥺
