Skip to content

[C++] Add options for handling NAs to stddev and variance #28368

Closed

Description

@asfimport

Currently the compute kernels stddev and variance automatically ignore NAs, but it would be useful if there was an option to toggle this behaviour

Reporter: Nicola Crane / @thisisnic
Assignee: David Li / @lidavidm
Watchers: Rok Mihevc / @rok

Related issues:

Note: This issue was originally created as ARROW-12615. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Apr 30, 2021

    @asfimport
    Author
  2. asfimport commented on Apr 30, 2021

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    Can you detail what the different options should be? We may propagate nulls but I'm not sure that's a very useful behaviour.

  3. asfimport commented on Apr 30, 2021

    @asfimport
    Author

    Rok Mihevc / @rok:
    ARROW-12499 is about adding ScalarAggregateOptions to Any and All kernels.

    @pitrou I suppose we need this to match expected behaviour in R - na.rm and pandas - skip_na.

  4. asfimport commented on May 3, 2021

    @asfimport
    Author

    Joris Van den Bossche / @jorisvandenbossche:
    Yes, we are adding the option to skip nulls or not to several of the reduction kernels (default is to skip nulls, as is the current behaviour, and when not skipping nulls, any null in the input gives null as result). So it makes sense to add this to stddev/variance as well.

  5. asfimport commented on May 21, 2021

    @asfimport
    Author

    Rok Mihevc / @rok:
    Currently ScalarAggregateOptions has skip_nulls and min_count (at least how many non-nulls should input have). Would it make more sense to add ddof to ScalarAggregateOptions or skip_nulls and min_count to VarianceOptions currently used by stddev and variance kernels.

  6. asfimport commented on Jun 10, 2021

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    You could add skip_nulls and min_count to VarianceOptions.

  7. asfimport commented on Aug 26, 2021

    @asfimport
    Author

    David Li / @lidavidm:
    This was duplicated by ARROW-13691 which has a PR up (and takes the approach suggested by Antoine).

  8. added this to the 6.0.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions