Question: Question 1 . 5 . Assign the name by _ content to a DataFrame which counts the number of apps per 'Content Rating', indexed by
Question Assign the name bycontent to a DataFrame which counts the number of apps per 'Content Rating', indexed by 'Content Rating'.
Hint: To keep only certain columns in a DataFrame, call get with a list of the names of the columns you want to keep.
In:
bycontent apps.getContent Rating'groupbyContent Rating'count
bycontent
Out:
Content RatingAdults only EveryoneEveryone Mature TeenUnrated
In:
grader.checkq
Out:
q
results:
q
result:
Test case passed!
q
result:
Test case passed!
q
result:
Trying: bycontent.getbycontent.columnsindex 'Adults only Expecting: True Line in q Failed example: bycontent.getbycontent.columnsindex 'Adults only Exception raised: Traceback most recent call last: File optcondalibpythondoctestpy line in run execcompileexamplesource, filename, "single", File line in bycontent.getbycontent.columnsindex 'Adults only File optcondalibpythonsitepackagespandascoreindexesbasepy line in getitem return getitemkey IndexError: index is out of bounds for axis with size
q
result:
Trying: bycontent.getbycontent.columnsiloc # There are apps with Content Rating 'Adults only Expecting: True Line in q Failed example: bycontent.getbycontent.columnsiloc # There are apps with Content Rating 'Adults only Exception raised: Traceback most recent call last: File optcondalibpythondoctestpy line in run execcompileexamplesource, filename, "single", File line in bycontent.getbycontent.columnsiloc # There are apps with Content Rating 'Adults only File optcondalibpythonsitepackagespandascoreindexesbasepy line in getitem return getitemkey IndexError: index is out of bounds for axis with size
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
