Question: Question 2 : generate _ descriptors ( ) Write a function called generate _ descriptors ( df ) which takes in the DataFrame you loaded

Question 2: generate_descriptors()
Write a function called generate_descriptors(df) which takes in the DataFrame you loaded from Question1 and returns a dataframe of all unique ticket descriptions and how frequent they are (e.g. it will tell you how many "HANDICAP" or "NO PERMITS U/M" tickets have been issued) for each of the following three time periods: morning (3 am to 11:59 am), afternoon (12 pm -5:59 pm), and evening (6 pm -2:59 am).
Make sure you drop na values of input df.
The DataFrame which generate_descriptors(df) returns should have 3 rows and 51 columns.
Index should be labelled as Morning, Afternoon, and Evening.
Column names should be unique values of df["Description"].

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!