beam-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Hulette (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (BEAM-11777) Support correct kwargs in aggregation methods on DataFrame, Series
Date Fri, 02 Apr 2021 22:45:00 GMT

    [ https://issues.apache.org/jira/browse/BEAM-11777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314106#comment-17314106
] 

Brian Hulette edited comment on BEAM-11777 at 4/2/21, 10:44 PM:
----------------------------------------------------------------

pandas community is discussing deprecating level= on these operations: https://github.com/pandas-dev/pandas/issues/39983

It's noted there that these are implemented by deferring to groupby. They actually use groupby.apply
(https://github.com/pandas-dev/pandas/blob/f2c8480af2f25efdbd803218b9d87980f416563e/pandas/core/generic.py#L10562)
which would be unliftable if we did it that way. But I think we could do it by just calling
dropna first.


was (Author: bhulette):
pandas community is discussing deprecating level= on these args: https://github.com/pandas-dev/pandas/issues/39983

It's noted there that these are implemented by deferring to groupby. They actually use groupby.apply
(https://github.com/pandas-dev/pandas/blob/f2c8480af2f25efdbd803218b9d87980f416563e/pandas/core/generic.py#L10562)
which would be unliftable if we did it that way. But I think we could do it by just calling
dropna first.

> Support correct kwargs in aggregation methods on DataFrame, Series
> ------------------------------------------------------------------
>
>                 Key: BEAM-11777
>                 URL: https://issues.apache.org/jira/browse/BEAM-11777
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Priority: P2
>              Labels: dataframe-api
>
> {DataFrame,Series}.{all, any, max, min, prod, mean, median, sum} are all implemented
via frame_base._agg_method, which just re-uses {DataFrame,Series}.agg}. However the pandas
operations have some different kwargs that are not supported by agg. Some are universal (level=,
skip_na=), others are unique to each operation (numeric_only= or bool_only=).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message