Question: The attribute ` shape ` tells you how many rows and columns are in a DataFrame. ( An attribute, or a property, is not a
The attribute shape tells you how many rows and columns are in a DataFrame. An attribute, or a property, is not a method and is not called using parentheses.
imdbbyname.shape
Like an array, you can get the first element of the shape using and the second element using For instance, the number of rows in imdbbyname is:
imdbbyname.shape
We can use this to answer "How many movies are from the th century?":
imdbbynameimdbbyname.getYearshape
Question Use shapeand arithmetic to find the proportion of movies in the dataset from the th century, and the proportion from the st century.
proportioninthcentury imdbbynameimdbbyname.getYearshape
proportioninthcentury
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
