Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Change the index of the below dataframe to the year column 7. Change the index of the below dataframe to the year column In [21]:
Change the index of the below dataframe to the year column
7. Change the index of the below dataframe to the year column In [21]: data = { 'countrycode': ['CHN' , 'CHN' , 'CHN' , 'FRA' , 'FRA' , 'FRA' ], 'pop' : [1124.8, 1246.8, 1318.2, 58.2, 60.8, 64.7], 'rgdpe' : [2. 611, 4.951, 11. 106, 1. 294, 1. 753, 2.032], 'year' : [1990, 2000, 2010, 1990, 2000, 2010]} pwt = pd. DataFrame (data) In [23] : Out [ 23 ] : countrycode pop rgdpe year 1990 CHN 1124.8 2.611 2000 CHN 1246.8 4.951 2010 CHN 1318.2 11.106 1990 FRA 58.2 1.294 2000 FRA 60.8 1.753 2010 FRA 64.7 2.032Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started