qsv
qsv copied to clipboard
`stats`: make `--infer-boolean` configurable
Currently, booleans are inferred when --infer-boolean
is enabled. The heuristic for inferring booleans is as follows:
- When a column's cardinality is 2, and;
- the 2 values' first characters are 0/1, t/f & y/n case-insensitive
Make it so the the first character heuristic is configurable, as t/f (True/False) and y/n (Yes/No) are English-centric.
Further, allow the user to specify more than just the first character, to eliminate false positives (e.g. A column whose cardinality is 2, and a domain of "Tom", "Frank" will be incorrectly inferred as boolean).