Skip to content

Instantly share code, notes, and snippets.

@Skanda319
Created October 18, 2019 00:33
Show Gist options
  • Save Skanda319/34e21f21853d1b13ddcc79d967bcd897 to your computer and use it in GitHub Desktop.
Save Skanda319/34e21f21853d1b13ddcc79d967bcd897 to your computer and use it in GitHub Desktop.
import pandas as pd
import io
import requests
url = "https://coinmetrics.io/newdata/"+"btc"+".csv"
s = requests.get(url).content
btc_data = pd.read_csv(io.StringIO(s.decode('utf-8')))
#we add this in to tag a larger data frame if we were
#pulling data for multiple coins
btc_data.insert(0, "token", "btc")
btc_data.tail()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment