I am trying to get the Adj Close prices from Yahoo Finance into a DataFrame. I have all the stocks I want but I am not able to sort on date.
stocks = [\'ORCL
f
is a Panel
You can get a DataFrame
and reset index (Date) using:
f.loc['Adj Close',:,:].reset_index()
but I'm not sure reset_index()
is very useful as you can get Date using
f.loc['Adj Close',:,:].index
You might have a look at http://pandas.pydata.org/pandas-docs/stable/indexing.html#different-choices-for-indexing about indexing