mirror of
https://github.com/UofCBaja/BajaCloud.git
synced 2025-06-15 05:04:17 -06:00
fix(SchedulePackager): changed comments
This commit is contained in:
parent
ca4d2e5796
commit
45f6cf83c8
26
ReadDB.py
Normal file
26
ReadDB.py
Normal file
@ -0,0 +1,26 @@
|
||||
import pandas as pd
|
||||
|
||||
def ReadDatabase():
|
||||
# Load the updated Excel file into a pandas DataFrame
|
||||
excel_file_path = "./interview_database.xlsx"
|
||||
df = pd.read_excel(excel_file_path)
|
||||
|
||||
# Initialize the dictionary to store the structured data
|
||||
interview_data = {}
|
||||
|
||||
# Group the DataFrame by Date, Start Time, and Slot for organization
|
||||
for _, row in df.iterrows():
|
||||
date = row['Date']
|
||||
start_time = row['Start Time']
|
||||
slot = int(row['Slot']) if not pd.isna(row['Slot']) else 0
|
||||
|
||||
# Initialize nested structure if not present
|
||||
if date not in interview_data:
|
||||
interview_data[date] = {}
|
||||
if start_time not in interview_data[date]:
|
||||
if len(str(row['Interviewee Name']).split()) != slot:
|
||||
interview_data[date][start_time] = {
|
||||
'Meeting Duration': row['Meeting Duration'],
|
||||
}
|
||||
# Print the structured dictionary in JSON format for readability
|
||||
return interview_data
|
BIN
interview_database.xlsx
Normal file
BIN
interview_database.xlsx
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user