title: groupby in Pandas -Python
body: <p>I am getting an error message when I try to perform an operation in a groupby object which I do not understand.</p>
  
  <p>For a reproducible example consider the following:</p>
  
  <pre><code>import pandas as pd
  
  species_plots_types
  
  
  
   record_id  plot_id plot_type   species_id
      0       1   2   Control NL
      2194    2   3   Long-term Krat Exclosure    NL
      1       3   2   Control DM
      4022    4   7   Rodent Exclosure    DM
      2195    5   3   Long-term Krat Exclosure    DM
      4838    6   1   Spectab exclosure   PF
      2       7   2   Control PE
      4839    8   1   Spectab exclosure   DM
      4840    9   1   Spectab exclosure   DM
      6833    10  6   Short-term Krat Exclosure   PF
      8415    11  5   Rodent Exclosure    DS
      4023    12  7   Rodent Exclosure    DM
      2196    13  3   Long-term Krat Exclosure    DM
      9609    14  8   Control DM
      6834    15  6   Short-term Krat Exclosure   DM
  
  species_plots_types.groupby["plot_type"].size().to_frame()
  
  TypeError: 'method' object is not subscriptable
  
  species_plots_types.groupby["plot_type"].count()
  
  TypeError: 'method' object is not subscriptable
  </code></pre>
  
  <p>Your advice will be appreciated.</p>