title: Aggregation in Pandas
body: <ol>
  <li>How can I perform aggregation with Pandas?</li>
  <li>No DataFrame after aggregation! What happened?</li>
  <li>How can I aggregate mainly strings columns (to <code>list</code>s, <code>tuple</code>s, <code>strings with separator</code>)?</li>
  <li>How can I aggregate counts?</li>
  <li>How can I create a new column filled by aggregated values?</li>
  </ol>
  <p>I've seen these recurring questions asking about various faces of the pandas aggregate functionality.
  Most of the information regarding aggregation and its various use cases today is fragmented across dozens of badly worded, unsearchable posts.
  The aim here is to collate some of the more important points for posterity.</p>
  <p>This Q&amp;A is meant to be the next instalment in a series of helpful user-guides:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/47152691">How to pivot a dataframe</a>,</li>
  <li><a href="https://stackoverflow.com/questions/49620538">Pandas concat</a></li>
  <li><a href="https://stackoverflow.com/questions/53217607">How do I operate on a DataFrame with a Series for every column?</a></li>
  <li><a href="https://stackoverflow.com/questions/53645882">Pandas Merging 101</a></li>
  </ul>
  <p>Please note that this post is not meant to be a replacement for the <a href="http://pandas.pydata.org/pandas-docs/stable/groupby.html#aggregation" rel="noreferrer">documentation about aggregation</a> and about <a href="http://pandas.pydata.org/pandas-docs/stable/groupby.html" rel="noreferrer">groupby</a>, so please read that as well!</p>