Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 111111
- import json
- import requests
- import pandas as pd
- c = requests.get('https://kudago.com/public-api/v1.4/locations/?lang=&fields=name,timezone&order_by=')
- c.text
- parsed_string=json.loads(c.text)
- cities=pd.DataFrame({'name':[],'timezone':[]})
- for row in parsed_string:
- j={'name': row['name'],
- 'timezone': row ['timezone']}
- cities=cities.append(pd.Series(j),ignore_index=True)
- cities
- 222222
- c = requests.get('https://kudago.com/public-api/v1.4/places/?lang=&fields=title,subway,address&location=spb&categories=cinema&page_size=100')
- c.text
- parsed_string=json.loads(c.text)
- parsed_string = parsed_string['results']
- cinema_spb=pd.DataFrame({'title':[],'subway':[],'address':[]})
- for row in parsed_string:
- j = {'title': row['title'],
- 'subway': row['subway'],
- 'address': row['address']
- }
- cinema_spb=cinema_spb.append(pd.Series(j),ignore_index=True)
- cinema_spb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement