Vectorizing/Parallelizing DataFrame indexing
Is that what you want?

In [261]: df
Out[261]:
  names  number
0   bob       5
1  sara      10
2   bob       8
3   foo      12
4   moo      16

In [262]: def my_op(ser):
     ...:     return ser.sum()
     ...:

In [263]: df.groupby('names').agg({'number':my_op})
Out[263]:
       number
names
bob        13
foo        12
moo        16
sara       10