Answer to Question #308435 in Python for Akash

Question #308435

You work in XYZ Corporation as a Data Analyst. Your corporation has told you to visualize the mtcars.csv dataset with various plots.

1. Plot the area chart for the colmns: ‘am’ and ‘carb’.

a. Set the ‘am’ on the x-axis.

b. Set the ‘carb’ on the y-axis.

c. Provide the x-axis label as Transmission.

d. Provide the y-axis labe as Number of carburetors.

e. Provide the title as Transmission vs Number of carburetors.



You work in XYZ Corporation as a Data Analyst. Your corporation has told you to visualize the mtcars.csv dataset with various plots.


1. Plot a pie chart for columns: ‘cyl’ and ‘model’ form the mtcars.csv data frame


1
Expert's answer
2022-03-09T12:32:41-0500
import matplotlib.pyplot as plt
import pandas as pd
df = pd.read_csv('mtcars.csv')



plt.plot(df['am'], df['carbs'])
plt.title('Transmission vs Number of carburetors')
plt.xlabel('Transmission')
plt.ylabel('Number of carburetors')
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