Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. infile = open(csvfile, 'r')
  2. count = 0
  3. for line in infile.readlines():
  4. count = count + 1
  5. print line
  6. print count
  7.  
  8. import csv
  9. probeFile = csv.reader(open(csvfile, 'rb'), dialect='excel', delimiter=',')
  10. for row in probeFile:
  11. print ', '.join(row)
  12.  
  13. Traceback (most recent call last):
  14. File "ProbeConverter.py", line 16, in <module>
  15. for row in probeFile:
  16. _csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement