[issue24787] csv.Sniffer guesses "M" instead of \t or , as the delimiter

Tiago Wright report at bugs.python.org
Fri Aug 7 02:45:50 CEST 2015


Tiago Wright added the comment:

I've run the Sniffer against the same data set, but varied the size of the
sample given to the code. It seems that feeding it more data actually seems
to make the results less accurate. Table attached.
On Thu, Aug 6, 2015 at 12:29 PM R. David Murray <report at bugs.python.org>
wrote:

>
> R. David Murray added the comment:
>
> Yes, much better :)
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue24787>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file40141/csvsniffertest5.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24787>
_______________________________________
-------------- next part --------------
                 lines3  lines7  lines70  lines700
human Sniff                                   
,     ,          490     487     424      393     
      A          1       0       0        0       
      Exception  6       8       4        4       
      c          1       1       1        1       
      g          1       0       0        0       
      h          1       0       0        0       
      space      0       0       9        7       
      y          0       0       1        1       
;     ;          1       1       1        1       
\t    \t         918     917     929      706     
      *          0       0       6        7       
      ,          6       3       2        1       
      -          0       0       0        5       
      :          0       2       2        2       
      D          5       0       0        0       
      E          0       0       10       10      
      Exception  52      91      18       18      
      M          1       1       0        0       
      c          2       0       0        0       
      m          2       0       0        0       
      p          61      27      22       22      
      s          0       0       2        2       
      space      1       6       51       125     
bar   bar        33      33      20       9       
space Exception  0       1       1        1       
      e          4       4       4        4       
      space      10      9       9        9       


More information about the Python-bugs-list mailing list