Question: 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  Help: paython I need to plot a histogram in anaconda prompt

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!