Odd csv column-name truncation with only one column
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Jul 20 04:31:29 EDT 2012
On Thu, 19 Jul 2012 15:52:12 +0200, Hans Mulder wrote:
> Perhaps it should be documented that the Sniffer doesn't work on
> single-column data.
>
> If you really need to read a one-column csv file, you'll have to find
> some other way to produce a Dialect object. Perhaps the predefined
> 'cvs.excel' dialect matches your data. If not, the easiest way might be
> to manually define a csv.Dialect subclass.
Perhaps the csv module could do with a pre-defined "one column" dialect.
If anyone comes up with one, do consider proposing it as a patch on the
bug tracker.
--
Steven
More information about the Python-list
mailing list