Created
May 19, 2017 18:00
-
-
Save shaneshifflett/494f675e5026dee95bda26cebc5a53e2 to your computer and use it in GitHub Desktop.
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
#install: https://www.continuum.io/downloads | |
import requests | |
import json | |
response = requests.get("https://itunes.apple.com/search?country=us&entity=software&term=flappy") | |
data = json.loads(response.content.decode('utf-8')) | |
print(data['results'][0].keys()) | |
values = list(map(lambda x: [x['price'], x['releaseDate'], x['trackName']], data['results'])) | |
df = pd.DataFrame(values, columns=['price', 'release-date', 'name']) | |
df.to_csv("~/for-steph.csv") | |
df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment