-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodule_data.py
More file actions
26 lines (18 loc) · 816 Bytes
/
module_data.py
File metadata and controls
26 lines (18 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pandas as pd
#EDUCATION_MODULES
#read in metadata from education_modules repository, which is automatically updated each week via a github action
education_modules_df = pd.read_json("assets/education_modules.json")
#remove empty rows created by data processing
education_modules_df= education_modules_df.dropna(axis=0, how='all')
#set 'module_id' as the index
education_modules_df = education_modules_df.set_index('module_id')
# make estimated_time_in_minutes an integer instead of a float
education_modules_df['estimated_time_in_minutes'] = education_modules_df['estimated_time_in_minutes'].astype(int)
#ARCUS_RESOURCES
# go here
# when ready
# :)
#CREATE THE DATAFRAME FOR APP USE
df=education_modules_df.astype('str').copy()
#TRUNCATE THE DATAFRAME FOR DEBUGGING WITH BELOW CODE:
#df = df.head(5)