-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
groupby/transform with NaNs in grouped column #9941
New issue
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
Labels
Milestone
Comments
http://pandas.pydata.org/pandas-docs/stable/groupby.html#na-group-handling This should work, so this is a bug as the NA group is not defined. Resultant value should be |
36 tasks
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Dec 18, 2016
3 tasks
jreback
pushed a commit
that referenced
this issue
Dec 18, 2016
ischurov
pushed a commit
to ischurov/pandas
that referenced
this issue
Dec 19, 2016
ShaharBental
pushed a commit
to ShaharBental/pandas
that referenced
this issue
Dec 26, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What's the expected behavior when grouping on a column containing
NaN
and then applyingtransform
? For aSeries
, the current result is to throw an exception:For a
DataFrame
, the missing value gets filled in with what looks like an uninitialized value fromnp.empty_like
:It seems like either it should fill in the missing values with
NaN
(which might require a change of dtype), or just drop those rows from the result (which requires the shape to change). Either solution has the potential to surprise.The text was updated successfully, but these errors were encountered: