title: How to read Data from CSV file column wise in nodejs
body: <p>I've a CSV file, with number of columns (containing headers as column ID), under each column there are set of rows (contains data for each column) but not each column's rows are equal (eg: col1, could have 4 rows .. but col2 could have 8 rows.)</p>
  <p>what i want to do i'm trying to read the data of each column and save it in a list to use it later in some processing.</p>
  <p>I'm trying to use CSV-parser but i couldn't figure out how to access the data of a specific column only.</p>
  <p>here is a sample of the csv</p>
  <pre><code>1 ,2
  How do I change my password? ,Why we use bottels?
  How can I change my password? ,Why you're lazy?
  How do I reset my password? ,Why do I get the message that the name of my APK is in use?
  How to do a password change?    
  How do I do a password change?  
  How can a password be changed?  
  </code></pre>
  <p>I've been trying to this so far</p>
  <pre><code>fs.createReadStream('test.csv')
      .pipe(csv())
      .on('data', (row) =&gt; {
          //console.log('New row ',row);
  
          if (columns === null) {
              columns = [];
          
              Object.keys(row).forEach(function (c) {
                  console.log(c) // this print headers only
                  //columns.push(c);
              })
          
          }
          Object.entries(row).forEach((r)=&gt;{
              console.log(r) // this prints the entire objects data
  
          }) 
  </code></pre>
  <p>What i want at the end is to have an array of arrays containing each columns data in a separate arr, (eg; <code>Arr = [ [col1 data(6 rows)] , [col2 data(3 rows)] ]</code></p>
  <p>My real csv file have a like 10000 column and in future it might be bigger.</p>