Last active
August 29, 2015 14:12
-
-
Save gartenfeld/8a8996468f6fab1a671d to your computer and use it in GitHub Desktop.
Reading from the columns of a CSV file.
This file contains hidden or 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 | |
f = open(csv_file.csv) | |
# Read the CSV format, each row will become an array | |
rows = csv.reader(f) | |
for row in rows | |
variable_a = row[0] # The first column | |
variable_b = row[1] # The second column, etc. | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment