1. Start off by importing the cars.csv file in the jupyter notebook.
2. Generate a line plot graph for the column ‘model’ and ‘hp’.
a. Map the ‘model’ column on the x-axis.
b. Map the ‘hp’ column on the y-axis.
c. Provide the x-axis label as Models of the cars.
d. Provide the y-axis label as Horse-Power of Cars.
e. Set the title as Model Names vs HorsePower.
lotlib.pyplot as plt
import pandas as pd
df = pd.read_csv('cars.csv)
plt.plot(df['model'], df['hp'])
plt.title('Model Names vs Horsepower')
plt.xlabel('Models of the cars')
plt.ylabel('Horse-power of cars')
plt.show()
Comments
Leave a comment