title: Concatenate dataframes alternating rows with Pandas
body: <p>I have two dataframes <code>df1</code> and <code>df2</code> that are defined like so:</p>
  
  <pre><code>df1          df2
  Out[69]:     Out[70]:
     A  B         A  B
  0  2  a      0  5  q
  1  1  s      1  6  w
  2  3  d      2  3  e
  3  4  f      3  1  r
  </code></pre>
  
  <p>My goal is to concatenate the dataframes by alternating the rows so that the resulting dataframe is like this:</p>
  
  <pre><code>dff
  Out[71]: 
     A  B
  0  2  a &lt;--- belongs to df1
  0  5  q &lt;--- belongs to df2
  1  1  s &lt;--- belongs to df1
  1  6  w &lt;--- belongs to df2
  2  3  d &lt;--- belongs to df1
  2  3  e &lt;--- belongs to df2
  3  4  f &lt;--- belongs to df1
  3  1  r &lt;--- belongs to df2
  </code></pre>
  
  <p>As you can see the first row of dff corresponds to the first row of df1 and the second row of dff is the first row of df2. The pattern repeats until the end.</p>
  
  <p>I tried to reach my goal by using the following lines of code:</p>
  
  <pre><code>import pandas as pd
  
  df1 = pd.DataFrame({'A':[2,1,3,4], 'B':['a','s','d','f']})
  df2 = pd.DataFrame({'A':[5,6,3,1], 'B':['q','w','e','r']})
  
  dfff = pd.DataFrame()
  for i in range(0,4):
      dfx = pd.concat([df1.iloc[i].T, df2.iloc[i].T])
      dfff = pd.concat([dfff, dfx])
  </code></pre>
  
  <p>However this approach doesn't work because <code>df1.iloc[i]</code> and df2.iloc[i] are automatically reshaped into columns instead of rows and I cannot revert the process (even by using <code>.T</code>).</p>
  
  <p><strong>Question</strong>: Can you please suggest me a nice and elegant way to reach my goal? </p>
  
  <p><strong>Optional</strong>: Can you also provide an explanation about how to convert a column back to row?</p>