title: Best way to query csv data with javascript
body: <p>I've been working with pandas in python to display graphs with plotly but now I want to move to javascript because I decided to (try to) build a react app.
  I'm reading the csv files using papaparser but it's not like pandas where you can make queries so for example I have the following csv file, what would be the best way to get arrays for combination of &quot;Region&quot; and &quot;Serie&quot;?
  In python would be:</p>
  <pre><code>target_region = df.query('Region == @region').drop('Region', axis=1).set_index('Serie').T
  </code></pre>
  <p>In javascript I'm thinking on building a loop that will read and save &quot;Region&quot; and &quot;Serie&quot; columns on two different arrays, then delete the duplicated values of them, then looping that the array of &quot;Region&quot; and &quot;Serie&quot; to save all the combinations values into new arrays that then will be displayed in a graph. But I may be re inventing the wheel or there are easier ways to do it, hopefully somebody knows about it.
  Thanks for helping.</p>
  <p>Here it is the data:
  <a href="https://i.stack.imgur.com/C78D3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C78D3.png" alt="enter image description here" /></a></p>