Question: Question 1 . 7 . Create a DataFrame called top _ social _ apps _ by _ content _ rating that contains one row for
Question Create a DataFrame called topsocialappsbycontentrating that contains one row for each unique 'Content Rating' that has apps satisfying both of these conditions:
'Category' is 'SOCIAL'.
'Rating' is between and inclusive
The structure of topsocialappsbycontentrating should be as follows:
It should have just one column, 'NumTopSocialApps', with the number of apps of that 'Content Rating' satisfying both conditions.
The rows should be sorted in decreasing order of 'NumTopSocialApps'.
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
Use assign and drop to rename the 'App' column to 'NumTopSocialApps'.
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
