Created
April 18, 2021 09:41
-
-
Save ThomasG77/0f063f92e149710175b92bca1e0cff31 to your computer and use it in GitHub Desktop.
This file contains 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 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