Peter Otten added the comment: The sniffer actually changes its "mind" in the fourth line:
Python 3.4.0 (default, Jun 19 2015, 14:20:21) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import csv >>> csv.Sniffer().sniff("""\ ... Invoice File,Credit Memo,Amount Claimed,Description,Invoice,Message, ... Sscanner ac15072911220.pdf,CM_15203,28714.32,MX Jan Feb,948198,, ... Sscanner ac15072911221.pdf,CM 16148,15600,MX Unkwon,948199,, ... """).delimiter ',' >>> csv.Sniffer().sniff("""\ ... Invoice File,Credit Memo,Amount Claimed,Description,Invoice,Message, ... Sscanner ac15072911220.pdf,CM_15203,28714.32,MX Jan Feb,948198,, ... Sscanner ac15072911221.pdf,CM 16148,15600,MX Unkwon,948199,, ... Sscanner ac15072911230.pdf,CM 16148,33488,MX Cavalier,948200,Photos don't match the invoice ... """).delimiter 'M' That line has only 5 commas while all others have 6. Unfortunately all lines contain exactly two "M"... ---------- nosy: +peter.otten _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24787> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com