Question: In this Lab, we will practice in Numpy, Pandas and simple linear regression. We will use the dataset mtcars. In [ 1 9 ] :

In this Lab, we will practice in Numpy, Pandas and simple linear regression. We will use the
dataset mtcars.
In [19]: import pandas aspd
import numpy asnp
import matplotlib.pyplot asplt
In [12]: cars_df = pd.read_csv(filepath_or_buffer='cars.csv')
cars_df.head()
Out [12] :
1.Convert the column mpg to numpy array and print the array. (5)
In [1]: #
calculate how many cars' mpg is under 15.(5)
In
3.Show the models that their mpg is under 15.(10)
In [3]:
4.Show how many unique make does the dataset have and print them out. (10)
In [4]:bar(#E)
5.Show how many cars each make has. (10)
 In this Lab, we will practice in Numpy, Pandas and simple

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!