Question: Question 1 . 7 . Create a DataFrame called top _ social _ apps _ by _ content _ rating that contains one row for

Question 1.7. Create a DataFrame called top_social_apps_by_content_rating that contains one row for each unique 'Content Rating' that has apps satisfying both of these conditions:
'Category' is 'SOCIAL'.
'Rating' is between 4 and 5(inclusive).
The structure of top_social_apps_by_content_rating should be as follows:
It should have just one column, 'Num_Top_Social_Apps', with the number of apps of that 'Content Rating' satisfying both conditions.
The rows should be sorted in decreasing order of 'Num_Top_Social_Apps'.
Hint: You can do this however you'd like, but what we did was:
Create a single DataFrame that contains only the rows of apps matching both specified conditions.
Call groupby on the DataFrame that resulted from step 1.
Use .assign and .drop to rename the 'App' column to 'Num_Top_Social_Apps'.
Sort the rows as required.
This is a hard question - take it one step at a time, and display all your intermediate results!

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 Programming Questions!