Problem Using partial with groupby and apply in Pandas
I am having trouble using partial with groupby and apply in Pandas. Perhaps I am not using this right?

data = {'a':[1,1,2,2],'b':['Y','Y','N','Y'], 'c':['Y','Y','N','Y']}
df = pandas.DataFrame(data)
def countY(columnName, group): return len(group[group[columnName] == 'Y'])
df.groupby('a').apply(partial(countY, 'b'))
AttributeError: 'functools.partial' object has no attribute '_module_'

welcome@welcome-ThinkCentre-Edge72:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

> > > import pandas
> > > from functools import partial
> > > data = {'a':[1,1,2,2],'b':['Y','Y','N','Y'], 'c':['Y','Y','N','Y']}
> > > df = pandas.DataFrame(data)
> > > def countY(columnName, group): return len(group[group[columnName] == 'Y'])
> > > ... 
> > > df.groupby('a').apply(partial(countY, 'b'))
> > > Traceback (most recent call last):
> > >   File "<stdin>", line 1, in <module>
> > >   File "/usr/local/lib/python2.7/dist-packages/pandas/core/groupby.py", line 420, in apply
> > >     @wraps(func)
> > >   File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
> > >     setattr(wrapper, attr, getattr(wrapped, attr))
> > > AttributeError: 'functools.partial' object has no attribute '**module**'
> > > pandas.**version**
> > > '0.13.1'
