Created
January 21, 2016 15:00
-
-
Save avwhite/95a54d280c69ed5eda30 to your computer and use it in GitHub Desktop.
Python script der loader data fra en csv fil
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 csv | |
#Koden: | |
# | |
# with open("filenavn") as file: | |
# #kode der bruger filen her | |
# | |
#svare til at sige: | |
# | |
# file = open("filnavn") | |
# #kode der bruger filen her | |
# | |
#bortset fra at versionen med `with` automatisk sørger for at lukke filen | |
#ordenligt igen. | |
with open("zenbudata.csv", "r", newline='') as csvfile: | |
csv = csv.reader(csvfile) | |
for row in csv: | |
print(row[5]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment