title: how to read file and split in scala
body: <p>If I had a file(like csv, txt...).</p>
  
  <p><a href="https://i.stack.imgur.com/EA7aq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EA7aq.png" alt="enter image description here"></a></p>
  
  <p>I wish get two array such as</p>
  
  <pre><code>Array(Array(1.0,2.0),Array(4.0,5.0),Array(7.0, 8.0),Array(10.0,11.0),Array(13.0,14.0))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Array(3.0, 6.0, 9.0, 12.0, 15.0)
  </code></pre>
  
  <p>What's the ideal way to do this in scala?</p>