code_presentation code_module score id_student id_assessment date_submitted
0 2013J AAA 78.0 11391 1752 18
1 2013J AAA 70.0 11391 1800 22
2 2013J AAA 72.0 31604 1752 17
3 2013J AAA 69.0 31604 1800 26
.....
I need to count submitted days and How to groupby it right ti get a result such as :
id_student id_assessment date_submitted
11391 1752 1
1800 1
31604 1752 1
1800 1
... etc
I try:
analasys_grouped = analasys.groupby ( 'id_student', as_index = False)\
.agg({'id_assessment':'count', 'date_submitted': 'count'})
analasys_grouped
but it is not working right