title: Getting an error when calculating standard deviation using Pandas
body: <p>I am trying to calculate standard deviation of multiple columns using two variables in the groupby. However, my code throws in an error and I am having a hard time figuring it out. </p>
  
  <p>I am using <a href="https://www.shanelynn.ie/summarising-aggregation-and-grouping-data-in-python-pandas/" rel="nofollow noreferrer">https://www.shanelynn.ie/summarising-aggregation-and-grouping-data-in-python-pandas/</a> as a guide.</p>
  
  <p>Below is a sample dataframe: </p>
  
  <pre><code>Book Home    Num    Pointspread  odds
  A   P       -135    -2.5        -110.0
  B   P        NaN    -3          -101.0
  B   P        NaN    -3          -110.0
  C   P        NaN    -3          -120.0
  B   P        NaN    -3          -100.0
  </code></pre>
  
  <p>and this the the code I wrote</p>
  
  <pre><code>home_std_dev = home_analysis_data.groupby('Book','Home').agg({'Num':'std',
                                                            'Pointspread':'std',
                                                             'odds':'std'})
  </code></pre>
  
  <p>The code above gives me an error </p>
  
  <pre><code>ValueError: No axis named Home for object type &lt;class 'type'&gt;
  </code></pre>
  
  <p>I don't know what this error means and how to solve the issue. I am expecting to see a table with the standard deviation of the columns grouped by the two variables. Any help will be appreciated. </p>
  
  <p>Since I'm quite new to python, please let me know if there is a better way to approach this issue. Thank you!</p>