Skip to content

count_nested changes types after query #472

@delucchi-cmu

Description

@delucchi-cmu

Bug report

I would expect the values in the count_nested returned frame to always take on integer values, and to have 0 if some value is not present.

Behavior mostly matches, but after the query in the below example, the counts are now floats and NaN.

Image

Environment Information


--------      SYSTEM INFO      --------
python        : 3.12.11
python-bits   : 64
OS            : Linux
OS-release    : 5.14.0-570.58.1.el9_6.x86_64
Version       : #1 SMP PREEMPT_DYNAMIC Fri Oct 31 13:55:05 UTC 2025
machine       : x86_64
processor     : 
byteorder     : little
LC_ALL        : 
LANG          : 
--------   INSTALLED VERSIONS   --------
lsdb          : 0.8.2
hats          : 0.8.2
nested-pandas : 0.6.8
pandas        : 2.3.1
numpy         : 2.4.2
dask          : 2025.7.0
pyarrow       : 17.0.0
fsspec        : 2025.7.0

Before submitting
Please check the following:

  • I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
  • I have included information about my environment, including the version of this package (e.g. nested_pandas.__version__)
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions