arquero icon indicating copy to clipboard operation
arquero copied to clipboard

`fromCSV` fails with uncaught TypeError on CSV with headers only

Open harveylee opened this issue 2 years ago • 1 comments

fromCSV('y,x0,x1')

throws

Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at fromTextRows (/home/yevs/fleetseer/fleetseer/node_modules/.pnpm/[email protected]/node_modules/arquero/dist/arquero.node.js:7347:17)

However,

table([['y', []], ['x0', []], ['x1', []])

succeeds in creating a table with the correct column names, albeit no rows.

harveylee avatar Dec 08 '22 04:12 harveylee

This is a bit of an issue when loading results from an athena query, since athena will produce an empty file with the headers and there's no way of knowing without parsing the file.

kitsunde avatar Oct 26 '23 11:10 kitsunde