I have this pandas data frame set up:
FY NY_State
0 1986-87 89431973
1 1987-88 95958200
2 1988-89 100664606
3 1989-90 99703990
4 1990-91 95446076
5 1991-92 91487047
6 1992-93 92658482
7 1993-94 88026334
8 1994-95 90845207
9 1995-96 80070860
10 1996-97 77357591
11 1997-98 87040859
12 1998-99 89547598
13 1999-00 93484650
14 2000-01 118696779
15 2001-02 132748185
16 2002-03 111932612
17 2003-04 116911977
18 2004-05 119898693
19 2005-06 149293542
20 2006-07 161647387
21 2007-08 193891526
22 2008-09 170071041
23 2009-10 180069745
24 2010-11 174704520
FWIW:
In [50]: totalData.dtypes
Out[50]:
FY object
NY_State int64
dtype: object
I want to make a bar chart with the FY on the x-axis and the y-axis being the amount in the NY_State column.
I've been getting some progress with this:
totalData.plot(x=totalData.FY, kind='bar')
but that gives me this:
Then I tried this:
totalData.plot(x=totalData.FY, kind='bar', ylim=(70000000, 240000000))
And that gave me this:
Which is better, but still not what I want. I tried:
totalData.plot(x=totalData.FY, y=totalData.NY_State, kind='bar')
but that gives me an exception of
IndexError: indices are out-of-bounds
...which makes no sense whatsoever to me how that's possible.
Would really appreciate help.