Conversation
michaeladrouillard
left a comment
There was a problem hiding this comment.
So you're on the right track, but just a couple of notes:
-
In question 2, you don't have to do f.readlines again.
data = np.loadtxt(fname=filepath, delimiter=',')is already loading in the content, so you can just refer to data. -
Somewhat related to that, instead of
data_min = patient_summary('../05_data/assignment_2_data/inflammation_01.csv','min'), you can keep the filepath as all_paths[0]. Either way is fine, but just letting you know that all_paths[0] does the same thing (selects the first file), except much shorter. -
For question three,
check_zeros(print(len(data_mean)))is incorrect. If you reason through what you're asking it to do at this point step by step, what youre asking is for it to pass the printed length of elements in data_mean through check_zeros. You're not actually passing any means through check_zeros for the function to actually check if there are any zeros. keep printing the length to the last step, this is just a test to see if you have the right amount of means calculated. -
Instead, think about what it is you need detect_problems to do. You already have a function that checks zeros built for you. In your last question, you developed a function that can calculate summary statistics. Think of a way to piece these togethers in detect_problems, which is a function that a) will calculate the summary statistics you want and b) check if there are any zeros within those summary statistics.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
What did you learn from the changes you have made?
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
Checklist