okfn / messytables

Tools for parsing messy tabular data. This is now superseded by https://github.com/frictionlessdata/tabulator-py
http://messytables.readthedocs.io/
387 stars 110 forks source link

Non strict type guessing is ambigious #77

Closed domoritz closed 11 years ago

domoritz commented 11 years ago

It does not handle the case where two types get the same weight. I guess the best is to prefer the type which comes sooner in the array that provides the types for guessing.

rossjones commented 11 years ago

@scraperdragon do you fancy reviewing this one?

scraperdragon commented 11 years ago

If we hold this to be important, the order of:

TYPES = [StringType, IntegerType, DecimalType, DateType]

becomes important.

We should probably prioritise less-lossy types over more-lossy types, so should this be:

TYPES = [StringType, DecimalType, IntegerType, DateType]

?

domoritz commented 11 years ago

@scraperdragon Makes sense. See 7e4f12a.