Question: a ) From these three lists, create a dataframe df where the column names are the list names and the list elements are the values
a From these three lists, create a dataframe df where the column names are the list names and the list elements are the values in the df columns.
Country USA 'China', 'India', 'Japan', 'Germany', UK 'France'
GDP
Population
b Check the index values of the dataframe.
c Set the country names as the index of df Print index of df
d Use loc to print the first three rows.
e Use iloc to print the first three rows.
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
