-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aaron #3
Aaron #3
Conversation
covid19_drdfm/processing.py
Outdated
|
||
# %% | ||
def fix_names(df: pd.DataFrame) -> pd.DataFrame: | ||
df = df.rename(columns={'Cases1': 'Pandemic_1', 'Cases2': 'Pandemic_2',\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove backslashes
covid19_drdfm/processing.py
Outdated
# return modified version of the dataframe | ||
# Have test code to validate""" | ||
|
||
def factordic() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can directly declare as a single return statement
return {'Cases1': ('Global1', 'Pandemic'), ...}
covid19_drdfm/processing.py
Outdated
|
||
def factordic() | ||
factors = {} | ||
factors[Cases1] = 'Global', 'Pandemic' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keys aren't strings
@AaronCooke2718 - Pushed fixes but some factors/mappings are missing so tests will not pass |
Terrible code.
Two functions, a rename function, and a new dictionary to use for the model.