Skip to main content

Crate gam_data

Crate gam_data 

Source

Structs§

DataSchema
EncodedDataset
SchemaColumn

Enums§

ColumnKindTag
DataError
Typed error variants for the data-loading module.
UnseenCategoryPolicy

Constants§

CATEGORICAL_CELL_SENTINEL
Prefix a typed Python frame stamps onto a cell that originates from a genuinely-categorical source column (string / object / categorical dtype). The column-major inference (infer_and_encode_column_major) and the schema-guided predict ingest (gam-pyffi::string_records_from_rows) both strip this prefix before recording or matching a level; its presence forces the column to Categorical even when every label parses as a number, so a string column labeled “0”,“1”,“2” is one centred factor level per label rather than a numeric ramp (#1317 / #1318). A leading NUL never appears in a numeric literal, so an untyped CSV/array frame (no prefix) is unaffected.

Functions§

encode_recordswith_inferred_schema
encode_recordswith_schema
infer_and_encode_column_major
Infer the schema of, and densely encode, a single column presented in column-major form (name + its raw string field for every row).
load_csvwith_inferred_schema
load_dataset_projected
load_dataset_projected_with_categorical_roles
Schema-inferring projected loader that forces a set of columns to ColumnKindTag::Categorical regardless of whether their labels parse as numbers.
load_datasetwith_schema_projected
strip_categorical_sentinel
Strip the leading CATEGORICAL_CELL_SENTINEL from a cell if present, returning the clean text and whether the marker was found.