am having exam dataframe with student.id marks
student.id marks
2 2
2 2
2 -1
3 -1
3 -1
3 2
4 2
4 -1
5 2
5 2
5 2
how could i sum total marks for a specific student.id like below table
student.id total-marks
2
3
4
5
how can i obtain the above table with respective total marks ? thanks