I have a big df which looks like this:
Name Year Runs Average
J. Doe 2016 432 44.5
J. Doe 2017 325 37.4
J. Bloggs 2016 289 54.3
I want to concatenate rows so that I can make a total for each name, rather than split by year. Some columns e.g. Runs would need to be summed and others e.g. Average would need other formulae dependent on other columns. The df is too big to do it manually, so is there a function I can use to combine these rows whenever there is a repeated name?