grafter
grafter copied to clipboard
Support Ragged Rows in CSV
read-dataset
should support a way of loading :ragged-rows
.
One approach might be to have a :ragged-rows
option to read-dataset
that when supplied provides a quick method of finding the number of columns on the widest row. The cost of this is that it will need to do two passes over the file.
NOTE: If we do this we need to be careful not to hold onto the head of the sequence of rows.
An alternative might be to provide a :with-header-row
option that lets you supply a header row, or a function to load one. If supplied a function the function will receive a dataset as an argument and be able to perform a pass over it to find a header row.