We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xref #10972 - but not the same issue. I've got a fix for this + #12737 coming.
In [20]: df = pd.DataFrame({'grouping':[np.nan,1,1,3], 'v':[1.1, 2.1, 3.1, 4.5], 'd':pd.date_range('2014-1-1','2014-1-4')}) In [21]: df.groupby('grouping')['d'].transform('first') --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-21-cb1ed73aabc3> in <module>() ----> 1 df.groupby('grouping')['d'].transform('first') C:\Users\Chris\Anaconda\lib\site-packages\pandas\core\groupby.pyc in transform(self, func, *args, **kwargs) 2738 # cythonized aggregation and merge 2739 return self._transform_fast( -> 2740 lambda: getattr(self, func)(*args, **kwargs)) 2741 2742 # reg transform C:\Users\Chris\Anaconda\lib\site-packages\pandas\core\groupby.pyc in _transform_fast(self, func) 2781 out = func().values[ids] 2782 if not mask.all(): -> 2783 out = np.where(mask, out, np.nan) 2784 2785 obs = np.zeros(ngroup, dtype='bool') TypeError: invalid type promotion
The text was updated successfully, but these errors were encountered:
009d1df
Successfully merging a pull request may close this issue.
xref #10972 - but not the same issue. I've got a fix for this + #12737 coming.
Code Sample, a copy-pastable example if possible
The text was updated successfully, but these errors were encountered: