Skip to content

Instantly share code, notes, and snippets.

@shaneshifflett
Created May 19, 2017 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaneshifflett/494f675e5026dee95bda26cebc5a53e2 to your computer and use it in GitHub Desktop.
Save shaneshifflett/494f675e5026dee95bda26cebc5a53e2 to your computer and use it in GitHub Desktop.
#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