This file contains hidden or 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 csv | |
| import gzip | |
| import io | |
| from urllib.request import Request, urlopen | |
| def download_brasilio_table(dataset, table_name): | |
| url = f"https://data.brasil.io/dataset/{dataset}/{table_name}.csv.gz" | |
| request = Request(url, headers={"User-Agent": "python-urllib"}) | |
| response = urlopen(request) |
This file contains hidden or 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
| print "Hello World" |