Last active
June 24, 2020 13:41
-
-
Save anapaulagomes/dcf146430030aa62e168f8f4696944f3 to your computer and use it in GitHub Desktop.
Filtra dados do Auxílio Emergencial por Código do Município no IBGE
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 | |
with open('202005_AuxilioEmergencial.csv', newline='', encoding="ISO-8859-1") as csvfile: | |
spamreader = csv.DictReader(csvfile, delimiter=';') | |
header = next(spamreader) | |
writer = csv.DictWriter(open('202005_AuxilioEmergencial-Feira.csv', 'w'), fieldnames=header) | |
for row in spamreader: | |
if row["CÓDIGO MUNICÍPIO IBGE"] == "2910800": | |
writer.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment