abhicodes commited on
Commit
5a27084
·
1 Parent(s): 845f8bb

Update analytics.py

Browse files
Files changed (1) hide show
  1. analytics.py +6 -3
analytics.py CHANGED
@@ -18,10 +18,13 @@ def write_to_csv_departments(time,teachingscore,teaching,courseContentscore,cour
18
  'libraryfacilities': libraryFacilities, 'extracurricularscore': extraCurricularscore,
19
  'extracurricular': extraCurricular, 'Email Address': ''}
20
 
21
- # Appending the new row to the DataFrame
22
- df = df.append(new_row, ignore_index=True)
 
 
 
23
 
24
- # Writing the DataFrame back to the CSV file
25
  df.to_csv(csv_file_path, index=False)
26
 
27
 
 
18
  'libraryfacilities': libraryFacilities, 'extracurricularscore': extraCurricularscore,
19
  'extracurricular': extraCurricular, 'Email Address': ''}
20
 
21
+ # Convert the new row to a DataFrame
22
+ new_data = pd.DataFrame(new_row, index=[0])
23
+
24
+ # Append the new data to the existing DataFrame
25
+ df = df.append(new_data, ignore_index=True)
26
 
27
+ # Write the DataFrame back to the CSV file
28
  df.to_csv(csv_file_path, index=False)
29
 
30