title: how to merge rows from a .dat file using python
body: <p>I have data like this in a .dat format</p>
  
  <pre><code>1 13 0.54 
  
  1 15 0.65
  
  1 67 0.55
  
  2 355 0.54
  
  2 456 0.29
  
  3 432 0.55
  
  3 542 0.333
  </code></pre>
  
  <p>I want to merge the rows starting with 1, 2 and so on and want a final file like this:</p>
  
  <pre><code>1 13 0.54 15 0.65 67 0.55
  
  2 355 0.54 456 0.29
  
  3 432 0.55 542 0.333
  </code></pre>
  
  <p>Can someone please help me? I am new to Python. Unless I get this format file I cannot run my abaqus code.</p>