Why not, like the apache arrow Table class, have the tables be iterable? Then arquero tables could be passed directly to d3.selection.data() without calling `.objects()` at all.
This seems to work:
aq.internal.Table.prototype[Symbol.iterator] = function *(x) {
const columns = this.columnNames().map(name => [name, this.column(name)])
for (let i = 0; i < this._nrows; i++) {
const out = {};
for (let [name, column] of columns) {
out[name] = column.get(i)
}
yield out
}
}
Thanks! While I like that an explicit objects() call might help users keep in mind the copying cost, on the other hand I like the directness of adding iterator support, which I think will prove more usable. Moved this to a GitHub issue which is a better venue for feature requests.