True in a Dask object column: identical text is not an identical Boolean state
Use original value types and missingness semantics as the handoff contract rather than display text.
The original type behind the text
Use original value types and missingness semantics as the handoff contract rather than display text. Extract Python value kinds before preparing Truthound inputs. A visible True can hide a Boolean-to-string change that alters downstream state handling. [1, 2, 3]
Classification without inspecting values
Dask #12176 reports pandas Boolean and NaN values in an object column becoming strings and NA through Dask. A follow-up points to automatic string conversion classifying a bare object dtype rather than inspecting values. Keep that candidate explanation scoped to the report instead of claiming every object column changes. [1]
Preserve types with masks
Record raw value types, missing masks and actual computed types. Hold consumption if a Boolean contract becomes string before an explicit conversion policy is chosen. Define approved Boolean, string and missing mappings, retaining value-level kinds rather than replacing them with one column dtype. [1, 3]
Two semantic types for True
The illustrative state column permits actual Boolean True and missing values. Its first row requires semantic type boolean; observed boolean meets that condition. Text True has type string and fails. Correct type still requires checking values and the locations and counts of missing records. [1, 3]
A bounded comparison of kind labels
Truthound Core Python SDK 3.3.2 can compare prepared approved_semantic_type and actual_semantic_type using ColumnPairValidator with relationship="==". The operator extracts original value kinds into non-missing labels. The SDK does not change automatic string-conversion settings, and type agreement does not establish equal values or missing counts. [1, 2, 3]
Handoff with an explicit type
Choose explicit nullable Boolean or a verified conversion setting and reconcile computed values and masks again. A field intended as textual state needs another contract. Retain existing raw-type evidence where the same consumer path is already reconciled. [1, 3]
Application conditions
Extract original types without loss and define approved Boolean, string and missing mappings.
Alternatives
Choose explicit nullable Boolean or verified conversion settings and reconcile computed values and masks.
Limitations
Core compares semantic-type labels, does not change automatic conversion and cannot prove value or missing-count equality from types.
Evidence
- Event checked
- Subject checked
- Modified
