wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
5.9k stars 605 forks source link

Would like to be able to force the type of columns in csv file when using csvsql #1220

Closed ChenglimEar closed 7 months ago

ChenglimEar commented 7 months ago

The underlying agate library supports a force option where the types can be explicitly set for the columns. I'm hoping we can expose that capability in csvsql. Ideally, the types can be provided using the SQL that was created by csvsql when inference is turned on. This SQL can then be manually manipulated for the columns where the inference is wrong and fed back into csvsql for subsequent runs.

jpmckinney commented 7 months ago

Duplicate #151. Happy to receive any pull requests!