Let us begin by calculating the attendence_score of each students. Do the following: Create a new column called attendence_score. Fill in the column using the following criteria:
No Absence = 5
1-5 Absences = 4
6-10 Absences = 3
11-15 Absences = 2
16-20 Absences = 1
21 or more Absences = 0
In dataset there's a column named absenses
.
My ideas is use if condition to do this.
But I searched a lot of codes in here, most of codes are fill in NaN data. How to fix my case?