Question: The programming language is Python. The class is Data Science. I want to learn from this homework question that I did poorly on. When walking

The programming language is Python. The class is Data Science. I want to learn from this homework question that I did poorly on.

The programming language is Python. The class is Data Science. I want

When walking down the road you can see many items on the ground. When a group of individuals were surveyed about what types of items they have seen on the ground they stated the items below Coke can, pepsi can, tube of toothpaste, axe, coke can, playing cards, spark plug, hammer, cycling glove, cotton glove, golf ball, pair of slippers, hair brush, paint brush, nitrile glove, toy stuffed lemur, beach towel, contact lens case 1. a) Create an array of data that individuals see while driving down the road. b) Make a table named table which has a column named item which is made up of the elements of the previous array that you made in question 1. c) Write a function named glove_finder that takes in a single string parameter item. If item contains the word "glove" anywhere in the string item, then the function should return the string "glove", otherwise, the function should return item. d) Use your function that you created in question 3 to create a new column in table called new_item. The data in the column should be an application of the glove_finder function on the item column. Use the apply method/function. e) Make a new table that contains the counts of the items in new_item. Use group. f) Create a bar chart of the counts of the items in the new table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!