title: expanding mean on rows in pandas
body: <p>I am trying to calculate expanding mean on rows in my dataframe using pandas.
  All seems to be working fine if calculating for columns:</p>
  
  <pre><code>&gt;&gt;&gt; t = pd.DataFrame([1,2,3,4,5,np.nan])
  
  &gt;&gt;&gt; t
       0
  0  1.0
  1  2.0
  2  3.0
  3  4.0
  4  5.0
  5  NaN
  
  &gt;&gt;&gt; t.expanding(min_periods=2, axis=0).mean()
       0
  0  NaN
  1  1.5
  2  2.0
  3  2.5
  4  3.0
  5  3.0
  </code></pre>
  
  <p>however if I try the same rows, I get wrong results (seems like window of size 2 is applied all the time):</p>
  
  <pre><code>&gt;&gt;&gt; t.T
       0    1    2    3    4   5
  0  1.0  2.0  3.0  4.0  5.0 NaN
  
  &gt;&gt;&gt; t.T.expanding(min_periods=2, axis=1).mean()
      0    1    2    3    4   5
  0 NaN  1.5  2.5  3.5  4.5 NaN
  </code></pre>
  
  <p>seems like bug to me, but maybe I'm missing something... any clues please?</p>