Created
August 27, 2018 18:47
-
-
Save austinbrian/88e62fd99350e0ad62d503c0b41a6aff to your computer and use it in GitHub Desktop.
Get pandas df from public github rawusercontent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import requests | |
from io import BytesIO | |
# using a 538 dataset as an example | |
url = 'https://raw.githubusercontent.com/fivethirtyeight/data/master/bob-ross/elements-by-episode.csv' | |
response = requests.get(url) | |
content = BytesIO(response.content) | |
df = pd.read_csv(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment