have a df with values
df
name marks
mark 10
mark 40
tom 25
tom 20
mark 50
tom 5
tom 50
tom 25
tom 10
tom 15
How to sum the marks of names and count how many times it took
expected_output:
name total count
mark 100 3
tom 150 7
50-1,50-2,50-3? Why are50-3fortom=3?mark 40tomark 42? then is not possible get50, only10 and then 52