Skip to main content
Arize class used for logging typed feature or tag columns.

Usage

When initializing a Schema, TypedColumns can be used in place of a list of column names.
feature_column_names = TypedColumns(
  (inferred = ["feature_1", "feature_2"]),
  (to_str = ["feature_3"]),
  (to_int = ["feature_4"])
);

Fields

FieldData TypeDescription
inferredOptional[List[str]]List of columns that will not be altered at all. The values in these columns will have their type inferred as Arize validates and ingests the data. There’s no difference between passing in all column names into ‘inferred’ vs. not using TypedColumns at all.
to_strOptional[List[str]]List of columns that should be cast to pandas nullable StringDType.
to_floatOptional[List[str]]List of columns that should be cast to pandas nullable Int64DType.
to_intOptional[List[str]]List of columns that should be cast to pandas nullable Float64DType.

Code Example

schema = Schema(
    prediction_id_column_name='prediction_id',
    ...
    feature_column_names=TypedColumns(
        inferred=['age'],         # columns ingested as-is
        to_float=['distance'],    # columns cast to specified type
        to_int=['purchased'],
        to_str=['country'],
    ),
    tag_column_names=TypedColumns(
        inferred=['location', 'month', 'fruit'],
        to_int=['count'],
    ),
)