dsv.parse’s returned array should have a columns property.
mbostock opened this issue · comments
Mike Bostock commented
For example:
var data = csv.parse("a,b,c\n1,2,3\n");
data[0]; // {"a": 1, "b": 2, "c": 3}
data.columns; // ["a", "b", "c"]
Unlike Object.keys(data[0])
, the columns
field will be guaranteed to be in the same order as the source file. Related d3/d3#2653 d3/d3#858.