Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the type returned by quandl.get?

Tags:

python

quandl

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.

like image 866
Wojtek Wencel Avatar asked Nov 18 '16 20:11

Wojtek Wencel


People also ask

What is Quandl used for?

Quandl is a platform that provides its users with economic, financial and alternative datasets. Users can download free data, buy paid data or sell data to Quandl. In this guide, we will cover how to extract data using Excel and Python (separately).

How do I get Quandl data?

How to get a free Quandl API key? The first step to fetch data using Quandl API is to generate a free API key by creating an account on Nasdaq Data Link. You can find your API key in the account settings section once the account has been successfully created.


1 Answers

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. 
like image 192
Zhang18 Avatar answered Oct 16 '22 12:10

Zhang18