daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top