You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/10/13 17:25:01 UTC

[jira] [Commented] (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=17428365#comment-17428365 ] 

Beam JIRA Bot commented on BEAM-12495:
--------------------------------------

This issue was marked "stale-P2" and has not received a public comment in 14 days. It is now automatically moved to P3. If you are still affected by it, you can comment and move it back to P2.

> 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: dsl-dataframe, sdk-py-core
>            Reporter: Brian Hulette
>            Priority: P3
>              Labels: dataframe-api
>          Time Spent: 2h 10m
>  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)