Spaces:
Runtime error
Runtime error
Update analytics.py
Browse files- 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 |
-
#
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
#
|
| 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 |
|