Question: Problem 5: Vectorized operation of a DataFrame (Python/Jupyter Notebook) The GDP per capita is in US Dollars. Please create a DataFrame df_eur which contains the

Problem 5: Vectorized operation of a DataFrame (Python/Jupyter Notebook) The GDP perProblem 5: Vectorized operation of a DataFrame (Python/Jupyter Notebook)

The GDP per capita is in US Dollars. Please create a DataFrame df_eur which contains the GDP per capita in Euros.

  • Select 4 columns, '2016', '2017', '2018', '2019' and assign it to DataFrame df_usd.
  • Create df_eur from df_usd, assume 1 USD = 0.85 Euro.
  • Add country name to df_eur with df_eur['Country Name'] = df['Country Name']
  • Display df_eur to verify the result

In [11]: df Out[11]: Country Name 2016 2017 2018 2019 0 Australia 49971 54066 57395.0 54907 1 China 8147 8879 9976.0 10261 2 Germany 42098 44349 47639.0 46258 3 France 37037 38812 NaN 40493 4 United Kingdom 41064 40361 43043.0 42300 5 India 1732 1981 2005.0 2104 6 Japan 38761 38386 39159.0 40246 7 Russian Federation 8704 10720 11370.0 11584 8 United States 57927 59957 62840.0 65118 9 South Africa 5272 6132 6374.0 6001

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 Databases Questions!