mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.3k stars 1.14k forks source link

Safer Dynamic Typing? #1049

Open adelriosantiago opened 3 months ago

adelriosantiago commented 3 months ago

I was wondering if it is possible to have a behavior like Dynamic Typing that performs the transformation from string to other data types only if the entire row can be converted to this data type.

Reasoning:

The following TSV: image

Will be converted to: image

However, this now has 2 different datatypes for a single column, which can cause issues in further pipeline steps, this is not easy to see specially if the dataset is huge.

Is there a way to Dynamic Typing only if the entire column can be converted to such datatype? Otherwise, is there a way to see what datatypes a column has?