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

# column

## Module

Column wrapper for type-safe filtering and sorting.

## Column

Wrapper for ColumnInfo that provides type-safe filtering and sorting.

This class validates filter and sort operations based on the column's
data\_type and sortable attributes, ensuring only valid operations are performed.

**Examples**

```python theme={null}
# Access columns from a log stream
log_stream = LogStream.get(name="Production Logs", project_name="My AI Project")

# Filter and sort using columns
traces = log_stream.get_traces(
    filters=[
        log_stream.trace_columns["input"].contains("hello"),
        log_stream.trace_columns["created_at"].after("2024-01-01")
    ],
    sort=log_stream.trace_columns["created_at"].descending()
)
```

### after

```python theme={null}
def after(self, value: str | datetime.datetime) -> LogRecordsDateFilter
```

Filter for dates after a value (exclusive).

**Arguments**

* `value`: The threshold date (string or datetime).

### ascending

```python theme={null}
def ascending(self) -> LogRecordsSortClause
```

Sort in ascending order.

## Returns

LogRecordsSortClause: A configured sort clause.

## Raises

ValidationError: If the column is not sortable.

### before

```python theme={null}
def before(self, value: str | datetime.datetime) -> LogRecordsDateFilter
```

Filter for dates before a value (exclusive).

**Arguments**

* `value`: The threshold date (string or datetime).

### between

```python theme={null}
def between(self,
            min_value: int | float,
            max_value: int | float) -> LogRecordsNumberFilter
```

Filter for numbers within a range (inclusive).

**Arguments**

* `min_value`: The minimum value (inclusive).
* `max_value`: The maximum value (inclusive).

### contains

```python theme={null}
def contains(self, value: str, case_sensitive: bool=True) -> LogRecordsTextFilter
```

Filter for text that contains a substring.

**Arguments**

* `value`: The substring to search for.
* `case_sensitive`: Whether the search should be case-sensitive. Default is True.

### descending

```python theme={null}
def descending(self) -> LogRecordsSortClause
```

Sort in descending order.

## Returns

LogRecordsSortClause: A configured sort clause.

## Raises

ValidationError: If the column is not sortable.

### equals

```python theme={null}
def equals(self,
           value: str | bool,
           case_sensitive: bool=True) -> LogRecordsTextFilter | LogRecordsBooleanFilter
```

Filter for exact value match.

For text columns, performs exact text matching.
For boolean columns, performs boolean equality.

**Arguments**

* `value`: The value to match (string for text columns, boolean for boolean columns).
* `case_sensitive`: Whether text matching should be case-sensitive. Default is True.
  Ignored for boolean columns.

### greater\_than

```python theme={null}
def greater_than(self, value: int | float) -> LogRecordsNumberFilter
```

Filter for numbers greater than a value.

**Arguments**

* `value`: The threshold value (exclusive).

### greater\_than\_or\_equal

```python theme={null}
def greater_than_or_equal(self, value: int | float) -> LogRecordsNumberFilter
```

Filter for numbers greater than or equal to a value.

**Arguments**

* `value`: The threshold value (inclusive).

### is\_false

```python theme={null}
def is_false(self) -> LogRecordsBooleanFilter
```

Filter for boolean columns that are False.

**Examples**

```python theme={null}
log_stream.session_columns["has_error"].is_false()
```

### is\_true

```python theme={null}
def is_true(self) -> LogRecordsBooleanFilter
```

Filter for boolean columns that are True.

**Examples**

```python theme={null}
log_stream.session_columns["has_error"].is_true()
```

### less\_than

```python theme={null}
def less_than(self, value: int | float) -> LogRecordsNumberFilter
```

Filter for numbers less than a value.

**Arguments**

* `value`: The threshold value (exclusive).

### less\_than\_or\_equal

```python theme={null}
def less_than_or_equal(self, value: int | float) -> LogRecordsNumberFilter
```

Filter for numbers less than or equal to a value.

**Arguments**

* `value`: The threshold value (inclusive).

### not\_equals

```python theme={null}
def not_equals(self, value: str, case_sensitive: bool=True) -> LogRecordsTextFilter
```

Filter for text that does not match.

**Arguments**

* `value`: The text value to exclude.
* `case_sensitive`: Whether the match should be case-sensitive. Default is True.

### not\_in

```python theme={null}
def not_in(self,
           values: list[str],
           case_sensitive: bool=True) -> LogRecordsTextFilter
```

Filter for text that does not match any value in a list.

**Arguments**

* `values`: List of text values to exclude.
* `case_sensitive`: Whether the match should be case-sensitive. Default is True.

### on\_or\_after

```python theme={null}
def on_or_after(self, value: str | datetime.datetime) -> LogRecordsDateFilter
```

Filter for dates on or after a value (inclusive).

**Arguments**

* `value`: The threshold date (string or datetime).

### on\_or\_before

```python theme={null}
def on_or_before(self, value: str | datetime.datetime) -> LogRecordsDateFilter
```

Filter for dates on or before a value (inclusive).

**Arguments**

* `value`: The threshold date (string or datetime).

### one\_of

```python theme={null}
def one_of(self,
           values: list[str],
           case_sensitive: bool=True) -> LogRecordsTextFilter
```

Filter for text that matches any value in a list.

**Arguments**

* `values`: List of text values to match.
* `case_sensitive`: Whether the match should be case-sensitive. Default is True.

## ColumnCollection

A dictionary-like collection of Column objects for easy access by column ID.

This class provides convenient access to columns using dictionary syntax,
while also supporting iteration and other collection operations.

Inherits from `Mapping[str, Column]` to provide a read-only mapping interface.

**Examples**

```python theme={null}
log_stream = LogStream.get(name="Production Logs", project_name="My AI Project")

# Access a column by ID
input_column = log_stream.trace_columns["input"]

# Iterate over column IDs
for column_id in log_stream.trace_columns:
    print(column_id)

# Iterate over Column objects
for column in log_stream.trace_columns.values():
    print(column)

# Check if a column exists
if "input" in log_stream.trace_columns:
    print("Input column exists")
```
