Open
Conversation
pedram-aliniaye-asli
suggested changes
Sep 15, 2024
pedram-aliniaye-asli
left a comment
There was a problem hiding this comment.
You did a great job here!
Just a quick note:
- In this block of code:
if zeros_detector == True:
return("True, at least one patient has a mean inflammation score of 0")
else:
return("False, no patient has a mean inflammation score of 0")
You are returning two strings as a result. It is better to return the result as a value, like a boolean data such as True or False. Then, if you want you can print these strings based on the returned result.
Please go ahead and do the modifications and then let me know. Thanks!
|
Your modification changed the code, but actually, the logic is the same again. Now, You can just simply return the result of |
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)
In this assignment, we worked with a set of CSV files, iterated through their contents, and used those files in our functions. Additionally, we created functions and utilized the NumPy library to calculate the mean, minimum, and maximum of our data.
What did you learn from the changes you have made?
I learned how to work with files, how to read them, and how to create a function that is usable everywhere. I also became familiar with the NumPy library and its related built-in functions
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?
The only challenge I encountered was with the paths of the CSV files. I’m not sure why, but I couldn't read the file paths in this format:
all_paths = [
"../05_src/data/assignment_2_data/inflammation_01.csv",
"../05_src/data/assignment_2_data/inflammation_02.csv",
"../05_src/data/assignment_2_data/inflammation_03.csv",
"../05_src/data/assignment_2_data/inflammation_04.csv",
"../05_src/data/assignment_2_data/inflammation_05.csv",
"../05_src/data/assignment_2_data/inflammation_06.csv",
"../05_src/data/assignment_2_data/inflammation_07.csv",
"../05_src/data/assignment_2_data/inflammation_08.csv",
"../05_src/data/assignment_2_data/inflammation_09.csv",
"../05_src/data/assignment_2_data/inflammation_10.csv",
"../05_src/data/assignment_2_data/inflammation_11.csv",
"../05_src/data/assignment_2_data/inflammation_12.csv"
]
So I had to change it to this format :
all_paths = [
"../../05_src/data/assignment_2_data/inflammation_01.csv",
"../../05_src/data/assignment_2_data/inflammation_02.csv",
"../../05_src/data/assignment_2_data/inflammation_03.csv",
"../../05_src/data/assignment_2_data/inflammation_04.csv",
"../../05_src/data/assignment_2_data/inflammation_05.csv",
"../../05_src/data/assignment_2_data/inflammation_06.csv",
"../../05_src/data/assignment_2_data/inflammation_07.csv",
"../../05_src/data/assignment_2_data/inflammation_08.csv",
"../../05_src/data/assignment_2_data/inflammation_09.csv",
"../../05_src/data/assignment_2_data/inflammation_10.csv",
"../../05_src/data/assignment_2_data/inflammation_11.csv",
"../../05_src/data/assignment_2_data/inflammation_12.csv"
]
How were these changes tested?
By testing the functions with different samples, we can ensure they work as expected.
A reference to a related issue in your repository (if applicable)
Checklist