> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TypedColumns

<Frame caption="View Source on Github">
  <Card horizontal icon="github" title="client_python/src/arize/utils/types.py at main · Arize-ai/client_python" href="https://github.com/Arize-ai/client_python/blob/main/src/arize/utils/types.py#L712-L748">
    GitHub
  </Card>
</Frame>

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.

```javascript theme={null}
feature_column_names = TypedColumns(
  (inferred = ["feature_1", "feature_2"]),
  (to_str = ["feature_3"]),
  (to_int = ["feature_4"])
);
```

### Fields

| Field     | Data Type             | Description                                                                                                                                                                                                                                                      |
| --------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| inferred  | Optional\[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\_str   | Optional\[List\[str]] | List of columns that should be cast to pandas nullable [StringDType](https://pandas.pydata.org/docs/reference/api/pandas.StringDtype.html).                                                                                                                      |
| to\_float | Optional\[List\[str]] | List of columns that should be cast to pandas nullable [Int64DType](https://pandas.pydata.org/docs/reference/api/pandas.Int64Dtype.html).                                                                                                                        |
| to\_int   | Optional\[List\[str]] | List of columns that should be cast to pandas nullable [Float64DType](https://pandas.pydata.org/docs/reference/api/pandas.Float64Dtype.html).                                                                                                                    |

### Code Example

```python theme={null}
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'],
    ),
)
```
