Data structures for statistical computing in Python - SciPy Conferences
Data structures for statistical computing in Python - SciPy Conferences
Data structures for statistical computing in Python - SciPy Conferences
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
GroupBy <strong>in</strong> pandas<br />
We try to do someth<strong>in</strong>g similar <strong>in</strong> pandas; the <strong>in</strong>put can be any function or<br />
dict-like object mapp<strong>in</strong>g labels to groups:<br />
>>> data.groupby(labels).aggregate(np.mean)<br />
AAPL 210.77<br />
GOOG 621.245<br />
McK<strong>in</strong>ney () Statistical <strong>Data</strong> Structures <strong>in</strong> <strong>Python</strong> <strong>SciPy</strong> 2010 21 / 31