Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
