title: Linux transpose long format to wide format
body: <p>Im looking to transpose a file from long format using either an awk statement or Python.</p>
  
  <p>My input file would look like this;</p>
  
  <pre><code>ID Chr_Position Geno
  111 1_1234 0
  111 1_12345 1
  111 1_2345 0
  111 2_23245 2
  </code></pre>
  
  <p>and my required output would like to be (header not necessarily needed)</p>
  
  <pre><code>ID 1_1234 1_12345 2_2345
  111 0 1 0 2
  112 1 1 1 1
  113 1 1 0 2
  </code></pre>
  
  <p>They are big files, over 100,000 IDs with over 10,000 rows each but can split into smaller if needed.
  I have previous code that will transpose rows and columns but not sure how to take it from long format.</p>