Repository navigation
Conversation
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 read a data file, calculated some descriptive statistics (mean, min, max), and did a simple analysis (checking for zeros).
What did you learn from the changes you have made?
I learned how to import data, calculate statistics, and perform a simple analysis (e.g., checking for values that meet a certain criterion).
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I was thinking about adding a for loop to the check_zeros helper function by iterating over each item in the array. It became a bit complicated. Then, I realized there is the np.where() function.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
I learned that the np.where function can take only 1 or 3 arguments, not 2. I was stuck on that error for a while before I did some research and corrected the issue. I also had some issues when I tried to return the boolean and index for the check_zeros helper function. I was not able to return True and the index together. Whenever the output was true, I would just get the index. After doing some research, I learned that because tuples are truthy, 'True' is almost implied when the tuple is returned, so 'True' is not included in the output.
How were these changes tested?
I did some extra tests in additional code blocks labelled 'Extra testing'. I basically took the output from each operation within the function to print it and troubleshoot. That way, I know how the information was flowing through the function.
A reference to a related issue in your repository (if applicable)
Checklist