Jupyter Notebook
Untitled5
Last Checkpoint: 26 minutes ago
(autosaved)
Current Kernel Logo
Python 3
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
!pip install quandl
import quandl
Requirement already satisfied: quandl in c:\users\nyckm\anaconda3\lib\site-packages (3.5.0)
Requirement already satisfied: numpy>=1.8 in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (1.16.4)
Requirement already satisfied: inflection>=0.3.1 in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (0.3.1)
Requirement already satisfied: requests>=2.7.0 in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (2.22.0)
Requirement already satisfied: six in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (1.12.0)
Requirement already satisfied: pandas>=0.14 in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (0.24.2)
Requirement already satisfied: python-dateutil in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (2.8.0)
Requirement already satisfied: more-itertools in c:\users\nyckm\anaconda3\lib\site-packages (from quandl) (7.0.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\nyckm\anaconda3\lib\site-packages (from requests>=2.7.0->quandl) (1.24.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\nyckm\anaconda3\lib\site-packages (from requests>=2.7.0->quandl) (2019.6.16)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\nyckm\anaconda3\lib\site-packages (from requests>=2.7.0->quandl) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\nyckm\anaconda3\lib\site-packages (from requests>=2.7.0->quandl) (3.0.4)
Requirement already satisfied: pytz>=2011k in c:\users\nyckm\anaconda3\lib\site-packages (from pandas>=0.14->quandl) (2019.1)
QUANDL_API_KEY = ‘fE4Fiy2uudaoEQ5J308H’
This is to prompt you to change the Quandl Key
if QUANDL_API_KEY == ‘fE4Fiy2uudaoEQ5J308H’:
Set the start and end date
start_date = ‘2019-01-01’
end_date = ‘2020-01-01’
Set the ticker name
ticker = ‘AMZN’
Feth the data
data = quandl.get(‘WIKI/’+ticker, start_date=start_date,
end_date=end_date, api_key= fE4Fiy2uudaoEQ5J308H)
Print the first 5 rows of the dataframe
data.head()
File “”, line 6
start_date = ‘2019-01-01’
^
IndentationError: expected an indented block