title: How to import list-like data into d3?
body: <p>I'm fairly new to D3 and I am having trouble loading and parsing data in a certain way.  </p>
  
  <p>I wish I could load some data to my javascript, based on the data itself and the images I wish to generate, it would be awesome if I can load and parse the data in the following fashion:  </p>
  
  <pre><code>{field:fieldname, data:[1,2,3,4...]} //an array
  </code></pre>
  
  <p>I used another python code to generate all the data, and I have tried different ways of writing this information.</p>
  
  <p>For example, I tried to use csv that goes either</p>
  
  <pre><code>field     ,data,data,data,data
  fieldnameA,1   ,2   ,3   ,4....
  fieldnameB,1   ,2   ,3   ,4....
  ......
  </code></pre>
  
  <p>or a transposed version:</p>
  
  <pre><code>fieldnameA, fieldnameB, fieldnameC...
  1         , 1         , 1         ...
  2         , 2         , 2         ...
  ...        ...        ...
  </code></pre>
  
  <p>I couldn't get either to work, and all the other examples I could find go in the format like the following, which is completely different from my goal:</p>
  
  <pre><code>filed     , data    
  fieldnameA, 1
  fieldnameB, 2
  fieldnameC, 3
  </code></pre>
  
  <p>I was wondering if I can just brutally write my csv as:</p>
  
  <pre><code>field     , data
  fieldnameA, [1,2,3,4...]
  fieldnameB, [1,2,3,4...]
  </code></pre>
  
  <p>But then I'm stuck parsing the list in D3...</p>
  
  <p>What would be my best bet here? Should I look into writing to JSON from python? I would really appreciate some help!</p>