1

I am trying to read csv file but the program does not support. it show error.

import csv
with open("aws2015120100.csv", "r") as f:
reader = csv.reader(f)
for row in reader:
print row
clt60
  • 62,119
  • 17
  • 107
  • 194
Vaibhav Kumar
  • 21
  • 1
  • 3

1 Answers1

1

Well given that your error is a python error, and your code looks like python, I'm gonna assume its python even though you have tagged it as bash. The solution is to add intendation to your code.

import csv
with open("aws2015120100.csv", "r") as f:
    reader = csv.reader(f)
    for row in reader:
        print row
Christian W.
  • 2,532
  • 1
  • 19
  • 31