Skip to content

groupby aggregation does not handle nan values well #5050

Open

Description

@ajpotts

Here's an example:


In [1]: import arkouda as ak
    _         _                   _       
   / \   _ __| | _____  _   _  __| | __ _ 
  / _ \ | '__| |/ / _ \| | | |/ _` |/ _` |
 / ___ \| |  |   < (_) | |_| | (_| | (_| |
/_/   \_\_|  |_|\_\___/ \__,_|\__,_|\__,_|
                                          
Client Version: 2025.09.30+42.ge795b3162.dirty
In [2]: ak.connect()
connected to arkouda server tcp://*:5555

In [3]: import numpy as np

In [4]: keys = ak.array([0,1,2,3,3,3,4,0,2,4])

In [5]: vals = ak.array([ -0.95, -0.57,  0.22, np.nan, np.nan, np.nan, -0.001, 0.0, 0.5, 1.0 ])

In [6]: g = ak.GroupBy(keys)

In [8]: k, v = g.min(vals, skipna=True)

In [9]: k
Out[9]: array([0 1 2 3 4])

In [10]: v
Out[10]: array([-0.94999999999999996 -0.56999999999999995 0.22 1.7976931348623157e+308 -0.001])


Activity

  1. added
    bug
    blocking
    on Nov 12, 2025
  2. ajpotts commented on Nov 13, 2025

    @ajpotts
    ContributorAuthor

    Created #5056 to deal with the min case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockingbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions