This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ejacq
Recipients ejacq
Date 2021-03-25.18:18:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616696315.22.0.477162760848.issue43625@roundup.psfhosted.org>
In-reply-to
Content
Here is an sample of CSV input:

"time","forces"
0,0
0.5,0.9

when calling has_header() from csv.py on this sample, it returns false.
Why? because 0 and 0.5 don't belong to the same type and thus the column is discarded by the heuristic.

I think the heuristic will better work if rather than just comparing number types, it would also consider casting the values in this order int -> float -> complex. If the values are similar then consider this upgraded type as the type of the column.

In the end, this file would be considered float columns with headers.
History
Date User Action Args
2021-03-25 18:18:35ejacqsetrecipients: + ejacq
2021-03-25 18:18:35ejacqsetmessageid: <1616696315.22.0.477162760848.issue43625@roundup.psfhosted.org>
2021-03-25 18:18:35ejacqlinkissue43625 messages
2021-03-25 18:18:35ejacqcreate