F01.justanswer.com



Part 2: Pandas Basics Given the following data:Create a dictionary and store this data into the dictionary. The keys of the dictionary are the column names. Reference the dictionary with the name “sales_data”. Print the dictionary. Paste the screenshot of your code hereCreate a pandas DataFrame from the dictionary and reference it with the name “car_sales”. Paste the screenshot of your code hereView the first 10 rows of car_sales Paste the screenshot of your code hereView the last three rows of car_salesPaste the screenshot of your code hereSelect and display the first five rows of data for the “Manufacturer” column. Paste the screenshot of your code hereSelect and display the first five row of data from the “Model” to “Sales2010” columns (inclusive). Paste the screenshot of your code hereSelect and display data from row 5 to row 10 as shown on the table below. Paste the screenshot of your code hereSelect and display data only from the “Model” and “Sales2010” columns and include only rows 5 to row 10 as shown below. Paste the screenshot of your code hereChange the column name “Manufacturer” to “Producer” in car_sales. Print the first 4 rows of car_sales.Paste the screenshot of your code hereSuppose that each sales value for 2012 is 1000 dollars above the sales value for 2011 for each vehicle model. Create another column for 2012 sales called Sales2012. Print the first 5 rows of the car_sales DataFramePaste the screenshot of your code herePermanently delete the Sales2010 Column and display the first 5 rows of car_salesPaste the screenshot of your code hereWrite a code that changes the index of the car_sales DataFrame to the letters of the alphabet. That is, 1= a, 2=b, 3=c, etc. print the entire car_sales DataFrame. Paste the screenshot of your code hereUse a Boolean selection to select only Sales2011 data where manufacturer (or producer) is “Toyota”Paste the screenshot of your code hereUse a Boolean selection to select all data in the car_sales where the manufacture is “Toyota”Paste the screenshot of your code hereUse Boolean selection to select only Sales2011 data whose values are 20,000 or above. Paste the screenshot of your code here ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download