Question: https://raw.githubusercontent.com/resbaz/r-novice-gapminder-files/master/data/gapminder-FiveYearData.csv 1.2 Understanding DataFrame 5 pts Read the provided gapminder.tsu file, and write single-command programs for each item: (a) Print the DataFrame. (b) Print the
https://raw.githubusercontent.com/resbaz/r-novice-gapminder-files/master/data/gapminder-FiveYearData.csv
1.2 Understanding DataFrame 5 pts Read the provided gapminder.tsu file, and write single-command programs for each item: (a) Print the DataFrame. (b) Print the first 7 rows of the DataFrame (c) Show the size of the DataFrame. Question 1 continued on next page. Page 2 of 5 Saeed Mirghasemi COMP132 Assignment #4 Question 1 (d) Show the complete details of the DataFrame. (e) Show only the type of elements in each column. (f) Show all the column headers for the DataFrame. 1.3 Subsetting columns and rows 15pts Using the gapminder DataFrame, do the following (a) Show the 10-20th rows of the column continent 2 pts (b) Show the first 58-65th rows of columns country, year, and pop' in a single command. 3 pts) (c) Delete the last two columns and show the 20-34th rows of the result. 5 pts (d) Change the pop' header to 'population', and set the population' column as the index. 5 pts) Question 2 In this question (40pts] you will be im provided dataset. You will learn how to subset a Dataframe, how to make simple changes to a DataFrame, and how to visualize the results of your analysis. Also, you will be practicing the usage of if and for statements in your data analysis process. Make a new copy of the gapminder DataFrame and do the following: 2.1 Subsetting a DataFrame [10 pts simple data analysis programs on the (a) Subset all the rows related to New Zealand and print the results. 3 pts (b) Extract the "lifeExp' column from what you have subset in (a). 3 pts (c) Extract the information from the 'continent' and pop columns in 1982 from what you have subset in (a). 4 pts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
