Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 Load the energy data from the file assets / Energy Indicators.xls , which is a list of indicators of energy supply and renewable
Question
Load the energy data from the file assetsEnergy Indicators.xls which is a list of indicators of energy supply and renewable electricity production from the United Nations for the year and should be put into a DataFrame with the variable name of Energy.
Keep in mind that this is an Excel file, and not a comma separated values file. Also, make sure to exclude the footer and header information from the datafile. The first two columns are unneccessary, so you should get rid of them, and you should change the column labels so that the columns are:
Country 'Energy Supply', 'Energy Supply per Capita', Renewable
Convert Energy Supply to gigajoules Note: there are gigajoules in a petajoule For all countries which have missing data eg data with make sure this is reflected as npNaN values.
Rename the following list of countries for use in later questions:
"Republic of Korea": "South Korea", "United States of America": "United States", "United Kingdom of Great Britain and Northern Ireland": "United Kingdom", "China, Hong Kong Special Administrative Region": "Hong Kong"
There are also several countries with parenthesis in their name. Be sure to remove these, eg 'Bolivia Plurinational State of should be 'Bolivia'. Additionally, there are several countries with Numeric digits in their name. Make sure to remove these as well, eg 'Italy should be 'Italy'.
Next, load the GDP data from the file assetsworldbank.csv which is a csv containing countries' GDP from to from World Bank. Call this DataFrame GDP
Make sure to skip the header, and rename the following list of countries:
"Korea, Rep.": "South Korea", "Iran, Islamic Rep.": "Iran", "Hong Kong SAR, China": "Hong Kong"
Finally, load the Sciamgo Journal and Country Rank data for Energy Engineering and Power Technology from the file assetsscimagojrxlsx which ranks countries based on their journal contributions in the aforementioned area. Call this DataFrame ScimEn.
Join the three datasets: GDP Energy, and ScimEn into a new dataset using the intersection of country names Use only the last years of GDP data and only the top countries by Scimagojr 'Rank' Rank through
The index of this DataFrame should be the name of the country, and the columns should be Rank 'Documents', 'Citable documents', 'Citations', 'Selfcitations', 'Citations per document', H index', 'Energy Supply', 'Energy Supply per Capita', Renewable',
This function should return a DataFrame with columns and entries, and the rows of the DataFrame should be sorted by "Rank".
Step 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