Add necessary code and comments to complete Assignment 2#2
Open
Add necessary code and comments to complete Assignment 2#2
Conversation
tianyi21
approved these changes
Oct 28, 2025
tianyi21
left a comment
There was a problem hiding this comment.
Hi Ceci,
✅ You implemented the function to read and display a file.
✅ You completed the patient_summary() function to summarize a file 💬.
✅ You implemented the detect_problems() function to check the file.
💬 We defined a variable ax = 1 to specify that we would like to summarize over the row (axis 1). To improve readability and clarity, you may directly specify axis=ax in the np functions.
🎉 Your A2 is complete!
🎊 All your Python assessments are now complete. Thank you for your participation, and I wish you all the best for your future!
Thanks,
Tianyi [LS]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I am adding code to read data from the first patient session, compute summary statistics by patient across days, and evaluate the patients' mean summary statistics for data irregularity.
What did you learn from the changes you have made?
I continue to learn the importance of understanding data structures to code file paths correctly and to pass function arguments to function parameters (especially in Part 3).
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of? Yes, I initially tried copying the file path from Part 2 as a separate line of code before realizing I could reference the file_path directly in Part 3 instead.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Also in Part 3, I needed to look up again how to return a function value by passing in the result of another function. I did this by referring back to the course slides, lecture materials, and the recommended course video to better understand that a function can directly use the return value of a nested function for its output.
How were these changes tested?
I copied the data file into Excel and ran the average() function to test a print of my mean_result variable array.
A reference to a related issue in your repository (if applicable)
I mistakenly named my Assignment_2 branch 'assignment' and had to rename it before committing and pushing my assignment. I learned that I could do this directly in GitHub, which automatically generated the following code for me once I approved the renaming change:
git branch -m assignment assignment-2
git fetch origin
git branch -u origin/assignment-2 assignment-2
git remote set-head origin -a
I also originally mistakenly worked in my main branch, so I hope my git push is okay. :( But, I think my code works as it should.
Checklist