Question: Which statement selects the column Name from the country dataframe and returns another dataframe? country.Name country [ ' Name ' ] country [ [ '

Which statement selects the column Name from the country dataframe and returns another dataframe?
country.Name
country['Name']
country[['Name']]
2)
What pandas object is returned by the statement country[['Name', 'Continent']]?
Series
DataFrame
3)
What statement returns the first 10 rows of the country dataframe?
country[1:10]
country[0:10]
country[[0:10]]
4)
What statement returns the first 5 rows of the dataframe and the columns Name and Population?
country.loc[0:4,['Name', 'Population']]
country.iloc[0:4,['Name', 'Population']]
country[0:4,['Name', 'Population']]

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!