Skip to content

Instantly share code, notes, and snippets.

@greut
Created August 24, 2015 13:53
Show Gist options
  • Select an option

  • Save greut/cd3727fb478afc954430 to your computer and use it in GitHub Desktop.

Select an option

Save greut/cd3727fb478afc954430 to your computer and use it in GitHub Desktop.
Loading swiss municipalities.
#!/bin/python3
import csv
with open("PLZO_CSV_WGS84.csv", encoding="iso-8859-15") as f:
reader = csv.reader(f, delimiter=";")
next(reader) # skip headers
for row in reader:
ort, plz, _, gemeinde, kanton, east, north = row
print ("{} {} ({}) {}, {}".format(plz, ort, kanton, north, east))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment