Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def exercise09(): ''' Load historical Bitcoin prices that are in JSON format from https://api.coindesk.com/v1/bpi/historical/close.json using start date 9/1/2017 and end date 10/5/2018. Documentation on the

def exercise09(): ''' Load historical Bitcoin prices that are in JSON format from https://api.coindesk.com/v1/bpi/historical/close.json using start date 9/1/2017 and end date 10/5/2018. Documentation on the API is here: https://www.coindesk.com/api/ Note: You may need to use the requests library and header spoofing to grab the data and then giving it to a DataFrame With the prices loaded into the DataFrame: - Drop the disclaimer column - Remove the bottom two rows - Plot a price timeseries and publish it to Plotly using the Plotly API and set the URL to the chart to the plotly_url variable. Publication to Plotly will occur programmtically via plotly API. You will need to import the library and create an API key from the plotly dashboard. - Print the head - Print the tail ''' header = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'} # ------ Place code below here \/ \/ \/ ------ # ------ Place code above here /\ /\ /\ ------ return df, plotly_url 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions