Data analyzing a csv file into list, not getting the same result as my teacher
Question:
I am a beginner to python.
I am working on an assignment where I have to
- import pandas library
- read a csv file
- analyze dataframe by making them into a list
- use loops to find specific word in each row of list
When I try to pull certain values from the list according to the word "New York" it is pulling numbers that do not have the word "New York" in the row.
I have attached my code and my teachers code as an example. I am trying to get my output to look like my teachers. Please let me know if you need anything else. Thank you!
Answers:
you are missing a tab in print (‘Order Amount: $’). so the order amount and running total are not filtered. enter image description here
I am a beginner to python.
I am working on an assignment where I have to
- import pandas library
- read a csv file
- analyze dataframe by making them into a list
- use loops to find specific word in each row of list
When I try to pull certain values from the list according to the word "New York" it is pulling numbers that do not have the word "New York" in the row.
I have attached my code and my teachers code as an example. I am trying to get my output to look like my teachers. Please let me know if you need anything else. Thank you!
you are missing a tab in print (‘Order Amount: $’). so the order amount and running total are not filtered. enter image description here