title: Transforming and preparing dataset for python LSTM using repeated rows
body: <p>I have a 2 data frames that looks like this:</p>
  <pre><code>tdelta      A                   tdelta            B     
   1          11                  1                21           
   2          24                  2                45          
   3          44                  3                65             
   4          77                  4                22            
     
  </code></pre>
  <p>I want to prepare a two different dataset that looks like this:
  (please take a note that for a given window value w- here it is 3 - we keep B constant and slide across A. and then proceed to next three values of B)</p>
  <pre><code>  A                         B
    11                        21
    24                        45 
    44                        65
    24                        21
    44                        45 
    77                        65
    44                        21
    77                        45
    NA                        65
    77                        21
    NA                        45
    NA                        65
    11                        45
    24                        65 
    44                        22
    24                        45
    44                        65 
    77                        22
    44                        45
    77                        65
    NA                        22
    77                        45
    NA                        65
    NA                        22
  
   
  </code></pre>