Add new scripts for processing exam groups and updating schedules; refactor existing code
This commit is contained in:
@@ -2,7 +2,7 @@ import pandas as pd
|
||||
|
||||
# Constants
|
||||
FILE_PATH = 'file.xlsx'
|
||||
SHEET_NAME = 'ps (32)'
|
||||
SHEET_NAME = 'ps (53)'
|
||||
OUTPUT_FILE_PATH = 'filtered_grote_lokalen.xlsx'
|
||||
EXAM_FORM_COLUMN = 'Examenvorm'
|
||||
REGISTRATION_COLUMN = 'Aant. inschr.'
|
||||
@@ -10,6 +10,7 @@ BEGIN_TIME_COLUMN = 'Beginuur S+'
|
||||
END_TIME_COLUMN = 'Einduur S+'
|
||||
TEACHERS_COLUMN = 'Docenten'
|
||||
LOCATION_COLUMNS = ['Datum S+', BEGIN_TIME_COLUMN, END_TIME_COLUMN, 'Studiegidsnr.', 'Omschrijving', TEACHERS_COLUMN, REGISTRATION_COLUMN]
|
||||
AANTAL_STUDENTEN = 65
|
||||
|
||||
# Read the Excel file
|
||||
def read_excel(file_path, sheet_name):
|
||||
@@ -18,7 +19,7 @@ def read_excel(file_path, sheet_name):
|
||||
# Filter DataFrame
|
||||
def filter_dataframe(df):
|
||||
df = df[df[EXAM_FORM_COLUMN] == 'Schriftelijk']
|
||||
df = df[df[REGISTRATION_COLUMN] > 65]
|
||||
df = df[df[REGISTRATION_COLUMN] > AANTAL_STUDENTEN]
|
||||
return df[LOCATION_COLUMNS]
|
||||
|
||||
# Format time strings
|
||||
|
||||
Reference in New Issue
Block a user