Skip to content

feat: add _numeric_sentinel_eligible dtype guard to _null_detection.py #170

@DEVunderdog

Description

@DEVunderdog

Parent

#94

What to build

Add _numeric_sentinel_eligible(dtype) to utils/_null_detection.py — a pure dtype predicate that returns True for all integer and float numeric Polars dtypes and False for everything else.

This becomes the single authority for which columns are eligible to receive user-declared numeric sentinel normalization, mirroring the existing _sentinel_eligible (string) and _inf_eligible (float NaN/Inf) functions already in the same module.

Acceptance criteria

  • _numeric_sentinel_eligible is defined in utils/_null_detection.py alongside the existing _sentinel_eligible and _inf_eligible functions
  • Returns True for all Polars integer dtypes (Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64)
  • Returns True for Float32 and Float64
  • Returns False for String/Utf8, Boolean, Date, Datetime, Duration, and any other non-numeric dtype
  • Unit tests added to tests/unit/profiling/test_null_detection.py covering all dtype cases above
  • Docstring follows the numpy-style convention required by ADR-0034

Blocked by

None — can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions