Student selection project for Projeto Ales
Pandas
- Download the code
- Keep the same folder structure
- Get the candidates data (.csv or .xlsx)
- Use the Jupyter Notebook "Executar.ipynb" to set up your parameters and run the code
Wraps all relevant data related to a single student
- data: a dictionary containing all relevant data (keys: attributes)
- returns: True if they are approved to enroll in any class, False otherwise
- returns: list containing all approved subjects
- returns: list containing all subjects in which the student was sent to the waiting list
- subject: name of a subject in which the student was sent to the waiting list
- subject: name of a subject in which the student is allowed to enroll
Processes raw student data, collecting relevant information
- file: .csv or .xlsx file directory with students data
- subjects: list of subjects, as they will be written
- attributes: which attributes should be collected, written as dictionary keys to the excel coluumn
- ignore: dictionary with subject names as keys, containing lists of students to be ignored
- returns: list of Students containing all students
- returns: dictionary with subject names as keys, containing lists of Students
Receives a list of students of a single subejct and sorts them, starting with those with more priority to be enrolled.
- criteria: list of tuples containing student attributes to be considered and if it is reversed or not. e.g. [("age", True), ("public school", False)]
- students: list os Students to be sorted
- returns: the same list, ordered according to the described behavior.
Decides if a student is allowed to enroll in a subject or if they need to go to the waiting list
- limit: dictionary containing the limit number of students, divided by subject
- students: dictionary containing all students sorted, divided by subject
- returns: dictionary containing the students, divided by subject. The students are updated, marking in which subjects they are allowed to enroll
Writes a .xlxs file with all approved students and subject classes
- students: contains all students approved and not approved
- path: directory to save the file (containing filename)
- subjects: list with the subject names
writes an excel file (directory + name in path) with all students sorted, approved (or not) and divided by subject