I'm trying to plot pandas to the web using Flask. I think i'm on the right track but i'm struggling to grab the date to put on the x axis.
for the y axis data, its easy:
aapl = pd.io.data.get_data_yahoo('AAPL', start=datetime.datetime(2006, 10, 1), end=datetime.datetime(2012, 1, 1))
all_close = appl['Close'][10:]
for close in all_close:
y.append(close)
easy enough. However there seems to be no way to get to the date out of the object this returns
This is what the dataframe looks like:
Open High Low Close Volume Adj Close
Date
2006-10-02 75.10 75.87 74.30 74.86 25451400 72.38
2006-10-03 74.45 74.95 73.19 74.08 28239600 71.63
2006-10-04 74.10 75.46 73.16 75.38 29610100 72.89
2006-10-05 74.53 76.16 74.13 74.83 24424400 72.35
2006-10-06 74.42 75.04 73.81 74.22 16677100 71.76
Anyone know how i'd get to that date?
Thanks
df.plot()to print to the web, so i'm pulling out all the data then drawing a new graph withFigureandFigureCanvasaapl.index[10:]works! want to answer so i can accept?