Data Frame in Python
Question: I am trying to download Apple's stock price in Python. I noticed that the data
however wasn't in a data frame. It was jumbled when I viewed it in my Spyder
IDE. How do I turn coerce it into a data frame/matrix format and how do I
reference data columns such as "Volume" "Adjusted Close"? I would appreciate
your help.

    
    
    import ystockquote as ys
    aapl=ys.get_historical_prices("aapl","2010-01-01","2015-01-01")
    


Answer: Not sure what the format of the data you have is, but you can create data
frames with something like this:

    
    
    import pandas as pd
    df = pd.DataFrame(data={'Volume': aapl['Volume'],
                            'Adjusted Close': aapl['Adjusted Close']})
    

The keys of the dictionary will be the column names of the data frame, and the
corresponding entries will become the columns.

Have a look at the [DataFrame documentation](http://pandas.pydata.org/pandas-
docs/stable/generated/pandas.DataFrame.html), it might give you some clues.

