Skip to content

How to query for NaN values? #3716

@johnkerl

Description

@johnkerl

How do you actually filter to just NaN values?

tiledbsoma.AxisQuery includes the following examples:

AxisQuery()  # all data
AxisQuery(coords=())  # also all data
AxisQuery(coords=(slice(1, 10),))  # 1D, slice
AxisQuery(coords=([0, 1, 2]))  # 1D, point indexing using array-like
AxisQuery(coords=(slice(None), numpy.array([0, 88, 1001])))  # 2D
AxisQuery(value_filter="tissue == 'lung'")
AxisQuery(coords=(slice(1,None),), value_filter="tissue == 'lung'")

None of these examples include filtering to just NaN values in the obs or var DataFrame.

I have quite a few rows in which the values in one column, at least when converted to pandas, is NaN, and not the string "NaN".

Everything that I've tried just results in The query condition statement could not be parsed properly., and I've tried many different ways of formatting the value_filter.

Originally posted by @nick-youngblut in #3638

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions