Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help: paython I need to plot a histogram in anaconda prompt that has y axix with years and x-axis with three bars(NYC population , NYC

Help: paython
I need to plot a histogram in anaconda prompt that has y axix with years and x-axis with three bars(NYC population , NYC consumption per day and per capita per person per day
I tried to plot the histogram after I downloaded cav file into anaconda as it shown in the picture but i failed to write the correct code (in In [6]:) to plot the histogram
Thank you image text in transcribed
jupyter NYC WATER_COMPSUMPTION Last Checkpoint: 35 minutes ago (autosaved) File Edit View Insert Cell Kernel Widgets Help In [1]: import pandas as pd In [3]: water - pd.read_csv("Water_Consumption.csv") out[3]: water.head () Year 0 1979 1 1980 2 1981 3 1982 4 1983 New York City Population 7102100.0 7071639.0 7089241.0 7109105.0 7181224.0 NYC Consumption(Million gallons per day) 1512.0 1506.0 1309.0 1382.0 1424.0 Per Capita(Gallons per person per day) 213 213 185 194 198 In [4]: import matplotlib.pyplot as pit %matplotlib nline In [6]: plt.style.use('ggplot') plt.xticks ([1,2,3]) plt.ylabel('Year) plt.legend () plt.title('Water Consumption In The New York City') pit.text( 'source: indeed.com') plt.show() jupyter NYC WATER_COMPSUMPTION Last Checkpoint: 35 minutes ago (autosaved) File Edit View Insert Cell Kernel Widgets Help In [1]: import pandas as pd In [3]: water - pd.read_csv("Water_Consumption.csv") out[3]: water.head () Year 0 1979 1 1980 2 1981 3 1982 4 1983 New York City Population 7102100.0 7071639.0 7089241.0 7109105.0 7181224.0 NYC Consumption(Million gallons per day) 1512.0 1506.0 1309.0 1382.0 1424.0 Per Capita(Gallons per person per day) 213 213 185 194 198 In [4]: import matplotlib.pyplot as pit %matplotlib nline In [6]: plt.style.use('ggplot') plt.xticks ([1,2,3]) plt.ylabel('Year) plt.legend () plt.title('Water Consumption In The New York City') pit.text( 'source: indeed.com') plt.show()

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions