title: Problems on how to transpose single column data in python
body: <p>I created a text file called 'column.txt' containing the following data:</p>
  
  <p>1<br>
  2<br>
  3<br>
  4<br>
  9<br>
  8  </p>
  
  <p>Then I wrote the code below to transpose my data to a single-row text file.</p>
  
  <pre><code>import numpy as np
  x=np.loadtxt('column.txt')
  z=x.T 
  y=x.transpose()
  np.savetxt('row.txt',y, fmt='%i') 
  </code></pre>
  
  <p>I tried two different ways - using matrix multiplication (the commented line in my code) and using transpose command. The problem was the output was exactly the same as the input!</p>
  
  <p>Afterwards, I added another column to the input file, ran the code and surprisingly this time the output was completely fine (The output contained two rows!)</p>
  
  <p>So my question is: </p>
  
  <p>Is there anyway to transpose a single column file to a single row one? If yes, could you please describe how? </p>