Question: Problem 2 Download the data 'auto.csv darr ' to your Week 2 folder. Load the auto data and name it auto. Find the length and

Problem 2
Download the data 'auto.csv darr ' to your Week 2 folder. Load the auto data and name it auto.
Find the length and the shape of auto.
Drop the missing values and name the data auto again (Hint: auto=auto.dropna()).
Find the column names of auto.
Find the first 20 rows of auto.
Select columns 'car', 'cylinders' and 'mpg'.
Select the cell at the third row (row 2) and the fifth column 5(column 4)
Select the data from row 30 to row 100 within the columns 'mpg' and 'car'
Sort auto by 'origin' and 'cylinders'
Drop auto columns 'displacement', 'weight', 'acceleration', and 'model', and name the remaining data as 'my_auto'
In the data table my_auto, select the rows by the two conditions: origin is US and mpg greater than 30, and name the selected rows as 'piece 1'
In the data table my_auto, select the rows by the two conditions: origin is Japan and mpg greater than 30, and name the selected rows as 'piece 2'
Merge piece 1 and piece 2 along rows, name the merged data as 'auto_new', and save it to 'auto_new.xlsx'
Group auto_new by 'origin' and 'cylinders', and calculate the mean of other numerical columns.
 Problem 2 Download the data 'auto.csv darr ' to your Week

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!