title: ValueError: No axis named Time to Close for object type <class 'pandas.core.frame.DataFrame'>
body: <p>I have found quite a few similar examples and maybe my issue is I am trying to do this in two steps instead of one. Unfortunately I only know how to do it in two parts so any help on how to either correct as is or merge into one line on code would be great!</p>
  <p>I am trying to calculate the time between first and last comments to determine how many days it took to work a case. I would also like to calculate the standard deviation in this new column to identify outliers afterwards (ill deal with that part later, I would just like to get to calculating it for now).</p>
  <p>First part works:</p>
  <pre><code>NewDF['Time to Close'] = NewDF.groupby('InquiryID') \
                                  ['CommentCreated'] \
                                  .transform(lambda x: (x.max()-x.min()).days)
  </code></pre>
  <p>Second part:</p>
  <pre><code>NewDF['Standard Deviation'] = NewDF.std('Time to Close')
  </code></pre>
  <p>Error returned:</p>
  <p>ValueError: No axis named Time to Close for object type &lt;class 'pandas.core.frame.DataFrame'&gt;</p>
  <p>Thanks for any help you can provide! If a link is more appropriate I could also use some guidance in that way!</p>