Skip to content

Instantly share code, notes, and snippets.

@nevadajames
Last active June 1, 2018 11:28
Show Gist options
  • Select an option

  • Save nevadajames/00dc68a8f44f8dc069d838cf061540b0 to your computer and use it in GitHub Desktop.

Select an option

Save nevadajames/00dc68a8f44f8dc069d838cf061540b0 to your computer and use it in GitHub Desktop.
Script to get data from csv
import csv
import sys
f = open('filename.csv', "rt")
reader = csv.reader(f)
row_count = 0
for row in reader:
if #do something with row get columns with row[index]:
#for cell in row:
#print(cell)
row_count += 1
print(str(row_count) + 'rows')
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment