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

# Column types

> How each column is read, how its type is chosen, and how to override it.

Every column is read as one of these types. The type is inferred from the values, and you can override it for any column.

| Type | How it is read |
| - | - |
| `number` | A numeric value. Booleans are read as 0 and 1. |
| `category` | A value from a set of values with no order between them. |
| `date` | A point in time. See below for how a date is turned into a number. |
| `text` | Free text, turned into a few numeric columns. See [Inputs](https://docs.tabsutra.com/concepts/inputs.md). |
| `image`, `audio`, `document` | A link to a file, turned into a few numeric columns in the same way. |
| `embedding` | A list of numbers that you computed yourself, such as the output of your own model. |
| `id` | A value that names a row. It is never read as a feature. |
| `ignore` | Not read at all. |

## How the type is inferred

The rules are applied in this order.

1. A column with no values at all is `ignore`.
2. A boolean column is a `category`.
3. A datetime column is a `date`. A string column is also a `date` when at least 95% of its distinct values read as dates.
4. A column whose cells are lists of numbers of the same length is an `embedding`.
5. A numeric column is a `number`. It is an `id` instead when it has at least 50 rows, holds only whole numbers, nearly every value is different (99% or more), and its name looks like an id, such as `id`, `customer_id` or `account_no`.
6. A string column is `text` when it has at least 64 distinct values and at least half of its values contain a space.
7. A string column is an `id` when it has at least 50 rows, nearly every value is different, and hardly any value contains a space.
8. Any other string column is a `category`.

The `image`, `audio` and `document` types are never inferred, because a link looks like any other string. Set them yourself with `column_types`.

The report of every request lists each column with its type and the reason the rule gave. Check it the first time you send a new table.

## Overriding a type

Pass `column_types` to change the type of any column.

```json theme={null}
"column_types": {"postcode": "category", "remarks": "text", "photo_url": "image", "batch_no": "ignore"}
```

Common reasons to override:

* A code stored as a number, such as a postcode or a product code, is a `category`, not a `number`.
* A short free-text field with few distinct values may be read as a `category`. Mark it as `text` if the wording matters.
* A column that would leak the answer, such as a field filled in after the outcome, should be `ignore`.

## Dates

A date is read as a point in time. When you give a `time_column`, every other date column is read relative to the row's own time. For example, an `account_opened` date on a row dated 31 October tells the model how long the account had been open on 31 October. This keeps the meaning of the column stable as time moves on.

## Columns the model does not read

The report lists the columns the model could not use, such as a column that has the same value in every context row. When you predict, the report also lists the columns of your rows that were not in the context. Those columns are not read.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.