fork(1) download
  1. #!/usr/bin/env python
  2. import csv
  3.  
  4. f = open('name.csv', 'r', encoding="shift-jis")
  5. reader = csv.reader(f)
  6. header = next(reader)
  7.  
  8. for row in reader:
  9. if row[27][2] == "山下":
  10. print(row[27])
  11.  
  12. f.close()
Runtime error #stdin #stdout #stderr 0.02s 44632KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "<builtin>/app_main.py", line 75, in run_toplevel
  File "prog.py", line 4, in <module>
    f = open('name.csv', 'r', encoding="shift-jis")
TypeError: __init__() got an unexpected keyword argument 'encoding'