uwdata / arquero

Query processing and transformation of array-backed data tables.
https://idl.uw.edu/arquero
BSD 3-Clause "New" or "Revised" License
1.22k stars 64 forks source link

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

Open harveylee opened 1 year ago

harveylee commented 1 year ago
fromCSV('y,x0,x1')

throws

Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at fromTextRows (/home/yevs/fleetseer/fleetseer/node_modules/.pnpm/arquero@5.1.0/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.

kitsunde commented 8 months ago

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.