title: TypeError: cannot handle this type -> object
body: <p>This code gives no errors:</p>
  
  <pre><code>r = df1.rolling(window = 32)
  r['msprice'].plot(color='red')
  </code></pre>
  
  <p>However, this code:</p>
  
  <pre><code>r = df1.rolling(window = 32).apply(lambda x : x[1] - x[2])
  r['msprice'].plot(color='red')
  </code></pre>
  
  <p>gives the following error:</p>
  
  <pre><code>ValueError: could not convert string to float:
  
  During handling of the above exception, another exception occurred:
  </code></pre>