title: Rolling or Siding window for transpose of a matrix
body: <p>I have the following data:</p>
  <p><img src="https://i.stack.imgur.com/l3pnK.jpg" alt="input data" /></p>
  <p>I want to obtain it this way:</p>
  <p><img src="https://i.stack.imgur.com/nFj3A.jpg" alt="output data" /></p>
  <p>What we have manually done here is considered a 3x1 matrix and transposed it to obtain 1x3 matrix for all 4 columns: A1, A2, A3 &amp; A4. I need to automate this process in python, and I believe rolling window is the solution. This needs to iterate through all rows (around 300 odd rows).</p>
  <p>Reproducible input:</p>
  <pre><code>df = pd.DataFrame({'A1': [1,1,0,1],
                     'A2': [1,0,0,0],
                     'A3': [1,0,1,1],
                     'A4': [1,0,0,0],
                     })
  </code></pre>