Answer to Question #307355 in Python for Akash

Question #307355

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. 





1
Expert's answer
2022-03-07T16:45:13-0500
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()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS