Skip to content

Instantly share code, notes, and snippets.

@ThomasG77
Created April 18, 2021 09:41
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 ThomasG77/0f063f92e149710175b92bca1e0cff31 to your computer and use it in GitHub Desktop.
Save ThomasG77/0f063f92e149710175b92bca1e0cff31 to your computer and use it in GitHub Desktop.
import json
def csv_reader(file_name):
for row in open(file_name, "r"):
yield row
total = 0
for line in csv_reader("full.sjson"):
content = json.loads(line)
if 'housenumbers' in content:
total += len(content['housenumbers'].keys())
else:
total += 1
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment