You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Brian Hulette (Jira)" <ji...@apache.org> on 2021/06/16 00:53:00 UTC
[jira] [Comment Edited] (BEAM-12495) DataFrame API:
groupby(dropna=False) still drops NAs when grouping on multiple columns or
indexes
[ https://issues.apache.org/jira/browse/BEAM-12495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17363990#comment-17363990 ]
Brian Hulette edited comment on BEAM-12495 at 6/16/21, 12:52 AM:
-----------------------------------------------------------------
I think once we merge pr/15019 that avoids producing a wrong result, sending an upstream fix to address it is probably low priority. It's a somewhat specific edge-case.
However, I encourage any Beam users to let us know if they run into this and we can consider prioritizing it.
was (Author: bhulette):
I think once we merge pr/15019 that avoids producing a wrong result, sending an upstream fix to address it is probably low priority. It's a somewhat specific edge-case.
However, I encourage any Beam users to let me know if they run into this and we can consider prioritizing it.
> DataFrame API: groupby(dropna=False) still drops NAs when grouping on multiple columns or indexes
> -------------------------------------------------------------------------------------------------
>
> Key: BEAM-12495
> URL: https://issues.apache.org/jira/browse/BEAM-12495
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Brian Hulette
> Assignee: Brian Hulette
> Priority: P2
> Labels: dataframe-api
> Time Spent: 1h
> Remaining Estimate: 0h
>
> {code}
> df.groupby(['foo', 'bar'], dropna=False).sum()
> {code}
> This will still drop NAs in the output.
> This is due to pandas bug [36470|https://github.com/pandas-dev/pandas/issues/36470] "BUG: groupby(..., dropna=False) excludes NA values when grouping on MultiIndex levels".
> We implement groupby by moving all grouped data into the index and requiring Index() partitioning, so we will always run into this issue, even when the user is grouping on columns, not indexes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)