Home > Software engineering >  how to add subtotal row in a df smartly
how to add subtotal row in a df smartly

Time:01-28

I have df like the one on the left. I would like to add subtotal row for each subject (highlighted in yellow in the right-side table).Currently my codes are able to achieve my goal but in a very silly way. I have to do the summary one by one.

  •  Tags:  
  • r
  • Related