Update requirements / format.

This commit is contained in:
Romain Dorgueil
2018-05-16 07:43:15 +02:00
parent 18180fdb11
commit a9c55de270
12 changed files with 79 additions and 70 deletions

View File

@ -56,7 +56,5 @@ if __name__ == '__main__':
local_path,
'bonobo-examples',
s3_path,
ExtraArgs={
'ACL': 'public-read'
}
ExtraArgs={'ACL': 'public-read'}
)

View File

@ -39,8 +39,12 @@ def _getlink(x):
def normalize(row):
result = {
**row,
'links': list(filter(None, map(_getlink, json.loads(row.get('links'))))),
'country': pycountry.countries.get(alpha_2=row.get('country_code', '').upper()).name,
'links':
list(filter(None, map(_getlink, json.loads(row.get('links'))))),
'country':
pycountry.countries.get(
alpha_2=row.get('country_code', '').upper()
).name,
}
return result