I am very new to Python. Any support is much appreciated
I have two csv files that I am trying to combine using the Student_ID column and create a new csv file.
csv 1: each entry has a unique studentID
Student_ID Age Course startYear 119 24 Bsc 2014
csv2: has several entries for studentID, as it has a new entry for each subject that the student accepts
Student_ID sub_name marks Sub_year_level 119 Botany1 60 2 119 Anatomy 70 2 119 cell bio 75 3 129 Physics1 78 2 129 Math1 60 1
I want to combine two csv files so that I have all the records and columns from csv1 and the new additional columns created, where I want to get the average indicator (should be calculated) from csv2 for each subject_year_level object for each student. Thus, the final csv file will have unique Student_Ids in all entries
I want my new csv output file to look like this:
Student_ID Age Course startYear level1_avg_mark levl2_avg_mark levl3_avgmark 119 24 Bsc 2014 60 65 70
source share