Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(0) Hi, I am having trouble with the first part of this question below: I know how to plot the heatmap, I just don't know

(0)

Hi, I am having trouble with the first part of this question below:

image text in transcribed

I know how to plot the heatmap, I just don't know how to create a new df for violators that obtained 3 business licenses or more under the same dba name.

Here is how I created the original data frame:

image text in transcribed

Any help on how to create a new df to filter for these results would be greatly appreciated!

Also, I think I have to answer this question using the format below, this is an example of another problem I solved:

image text in transcribed

Plot on the Heatmap those frequent violators who have obtained 3 business licenses or more under the same DBA Name through out the liftime of their business. You can answer this question from data already queried or you can do a new Elasticsearch query. In [153]: df1 = df_top_frequent_violators.groupby('DBA Name') In [154]: violations_count =df1[ [Inspection ID'].,count () licenses_count =df1[ 'License # ].nunique( ) In [156]: df_final = pd.DataFrame( { 'Violations': violations_count, 'Licenses \#': licenses_count }) In [157]: df_final.head(10) Out [157] : Violations Licenses DBA Name \begin{tabular}{rll} \hline A CHILD'S WORLD EARLY LEARNING CENTER & 7 & 2 \\ ADA S MCKINLEY MAGGIE DRUMMON & 5 & 2 \\ AMAZING GRACE DAYCARE CENTER & 7 & 2 \\ ANGELS & 5 & 2 \\ BOTTLES TO BOOKS LEARNING CENTER & 8 & 2 \\ BUSY BUMBLE BEE ACADEMY DAYCARE & 9 & 3 \\ COMMONWEALTH DAYCARE CENTER & 6 & 1 \\ DISCOVERY LEARNING ACADEMY, INC. & 6 & 2 \\ EARLY CHILDHOOD EDUCARE CENTER & 6 & 3 \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

l Identify three internal sources for recruiting.

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago