Skip to content
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

assignment 2 #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

assignment 2 #2

wants to merge 1 commit into from

Conversation

cecily-li
Copy link
Owner

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Adding code to complete assignment

What did you learn from the changes you have made?

Code not functioning as intended in the middle of a project/assignment can and will impact many aspects of downstream code.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

Attempted to use numpy to solve question 2.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

Attempted to use numpy to solve question 2 but was not successful. Reverted back to a method I was more familiar with but the code did not execute to give the intended outcome.

How were these changes tested?

Tested using the provided code blocks and by commenting out sections of code to test each of min, max, mean functions individually (undid these changes before submitting)

A reference to a related issue in your repository (if applicable)

N/A

Checklist

  • I can confirm that my changes are working as intended
    (response to question 2 is not functioning as intended, please see comments in code)

@cecily-li cecily-li changed the title python assignment 2 attempt assignment 2 May 14, 2024
Copy link

@michaeladrouillard michaeladrouillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For question 2, consider using numpy mean, max, and min functions. this way you don't have to write a for loop and manually calculate the average for the row. (you shouldnt have to write that line that checks for whether the values are ints or floats either!). As for file_path.operation, that line of code wont work because file_path and operation are two separate parameters. file_path stores a string containing a filepath, and operation contains strings saying either 'mean' or 'max' or 'min'. but either way, you shouldn't have to reference the file path again, since the values are already loaded in and stored as a variable called "data".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants