Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In [ ]: # Create a grid of charts with 1 rows and 3 columns. Plot the profit # comparison of the following pairs in

image text in transcribedimage text in transcribed
In [ ]: # Create a grid of charts with 1 rows and 3 columns. Plot the profit # comparison of the following pairs in each chart: apple vs pear, # banana vs kiwi, cherry vs. peach. Add an overall title for the 3 subplots. # Adjust spaces between charts so the final look resembles the answer. # To get the colors to match my chart, look for color names on this webpage: # https://matplotlib.org/3.l.l/gallery/coloramed_colors.html?highlight=color%20names p1t.figure(figsize=(12, 4)) In [ ]: # Get the mean profit of each fruit using the mean() method. Save it to # 'avgprofit'. Make sure to remove that of Total Profit before getting the mean # Sort avg_profit to ascending order. Make sure to change avg_profit itself. # Display avg_profit # create a bar chart using plt.bar() # x axis should display fruit names and bar height should be the mean profits # rotate the tick labels on xaxis by 35 degrees In: In [ ]: # Load the data in Bostonousing.csv into dataframe 'housing_df' # print out the shape, columns and top 5 rows of data Month Apple Banana Pear Cherry Watermelon Kiwi Peach Total Prot 2500 1500 5200 9200 1200 1490 21100 42190 2630 1200 5100 6100 2100 1845 18330 37305 2140 1340 4550 9550 3550 1135 22470 44735 3400 1130 5870 8870 1870 2007 22270 45417 3600 1740 4560 7760 1560 1876 20960 42056 2760 1555 4890 7490 1890 1540 20140 40265 2980 1120 4780 8980 1780 1120 29550 50310 3700 1400 5860 9960 2860 2001 36140 61921 3540 1780 6100 8100 2100 1658 23400 46678 1990 1890 8300 10300 2300 1900 26670 53350 2340 2100 7300 13300 2400 1756 41280 70476 2900 1760 7400 14400 1800 1977 30020 60257 a. owmwaam-th-n d A 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions