pythonquandl

What is the type returned by quandl.get?


I'm currently following tutorial in which you get data form quandl. I know the basics of python, but I can't figure out what is the type returned by quandl.get. I have searched for it, but everything I found refers to pandas. Do you know what type is it and where can I read some documentation about it? Here is the code I don't undestand:

df = quandl.get('WIKI/GOOGL')

df = df[['Adj. Open','Adj. High','Adj. Low','Adj. Close','Adj. Volume']]

I also dont get why there are double brackets in the second line, but I hope it will be clear after I can read something about it.


Solution

  • According to Quandl's documentation, it is by default a pandas data frame, and you can set returns = "numpy" to get a numpy object as an alternative.

    Definition:
    quandl.get(":database_code/:dataset_code", returns = ":return_format")
    
    Parameters:
    The parameter returns can take the following values:
    
       "numpy" : returns a numpy object
       "pandas" : returns a pandas data frame
    When returns is omitted, a pandas dataframe is returned.