'd3 importing csv file to array [duplicate]
I am trying to import a .csv file using the d3.csv() method. Here is my code:
d3.csv("data.csv", function(data) {
console.log(data);
})
What I thought I would get is an array containing objects, each representing a line of my .csv file (of which there are 50). What I'm actually getting, though, is a series of independent objects. That is, the function has logged 50 objects to my console, not one array containing 50 objects. Am I misunderstanding this method? If so, how can I get such an array?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
