---
title: Data Table
description: Filter data using SQL-style expressions (LIKE, IN, BETWEEN, IS NULL), sort by multiple columns, and select rows interactively. Selections sync across tabs for coordinated exploration.
priority: 0.6
---

# Data Table {#data-table}

The Data Table tab displays dataset contents in tabular format, allowing you to explore data using filters and sorting.

See also [Getting Started](getting-started).

![Data Table basic view](../shared/images/data-table-basic.webp)

## Filter Feature {#filter-feature}

Enter filter expressions to display only rows that match your conditions. Filters also apply to the Statistics tab, which computes statistics on the filtered data only. Graph Builder has its own filter setting and does not use the Data Table filter. Other analysis tabs also use the full, unfiltered data.

### Basic Usage {#basic-usage}

1. Enter an expression in the filter input field at the top of the Data Table tab
2. The filter applies automatically as you type — valid expressions take effect immediately
3. Only rows matching the condition are displayed. If the rows are narrowed down, the number of matching rows (Showing N of M rows) appears below the filter input

If the expression has an error, such as a syntax error or a column name that does not exist, the input field turns red. Hover over the input field to see the error message. The invalid expression is not applied, and the previous valid filter remains in effect.

### How to Write Filter Expressions {#how-to-write-filter-expressions}

Filter expressions use SQL-like syntax supporting comparison operators, LIKE, IN, BETWEEN, and more. Keywords (AND, OR, LIKE, IN, etc.) are case-insensitive. Enclose strings in single quotes and column names in double quotes. To include a single quote inside a string, write it twice, as in `name = 'O''Brien'`.

#### Comparison Operators {#comparison-operators}

| Operator | Meaning          | Example                 |
|----------|------------------|-------------------------|
| `=`      | Equal to         | `species = 'Adelie'`    |
| `!=`     | Not equal to     | `species != 'Adelie'`   |
| `>`      | Greater than     | `age > 30`              |
| `>=`     | Greater or equal | `age >= 30`             |
| `<`      | Less than        | `age < 30`              |
| `<=`     | Less or equal    | `age <= 30`             |

Numeric literals can be negative, such as `temperature > -5`.

#### Pattern Matching Operators {#pattern-matching-operators}

| Operator   | Meaning                              | Example                  |
|------------|--------------------------------------|--------------------------|
| `LIKE`     | Matches pattern (case-sensitive)     | `name LIKE '%田%'`       |
| `ILIKE`    | Matches pattern (case-insensitive)   | `name ILIKE '%Smith%'`   |
| `NOT LIKE`  | Does not match pattern (case-sensitive)   | `name NOT LIKE '%test%'`  |
| `NOT ILIKE` | Does not match pattern (case-insensitive) | `name NOT ILIKE '%test%'` |

Case sensitivity applies to letters, including full-width letters. Hiragana and katakana, as well as full-width and half-width characters, are treated as distinct by both LIKE and ILIKE.

**Pattern syntax:**
- `%` represents any string (0 or more characters)
- `_` represents any single character

There is no syntax to escape `%` or `_` to match them literally. To match values containing these characters exactly, use the `=` operator.

Examples:
- `name LIKE '%田%'` - Contains "田"
- `name LIKE '山%'` - Starts with "山"
- `name LIKE '%郎'` - Ends with "郎"
- `email LIKE '%@example.com'` - Ends with @example.com

#### Logical Operators {#logical-operators}

| Operator | Meaning  | Example                                          |
|----------|----------|--------------------------------------------------|
| `and`    | And      | `age > 30 and sex = 'male'`                      |
| `or`     | Or       | `species = 'Adelie' or species = 'Gentoo'`       |
| `()`     | Grouping | `(age > 30 or salary > 50000) and active = true` |

#### Set and Range Operators {#set-and-range-operators}

| Operator                  | Meaning                   | Example                                   |
|---------------------------|---------------------------|-------------------------------------------|
| `IN (...)`                | In list of values         | `species IN ('Adelie', 'Chinstrap')`      |
| `NOT IN (...)`            | Not in list of values     | `status NOT IN ('deleted', 'archived')`   |
| `BETWEEN ... AND ...`     | Within range (inclusive)  | `age BETWEEN 20 AND 30`                   |
| `NOT BETWEEN ... AND ...` | Outside range             | `age NOT BETWEEN 20 AND 30`               |

#### Negation Operator {#negation-operator}

| Operator    | Meaning            | Example                    |
|-------------|--------------------|----------------------------|
| `NOT (...)` | Negates condition  | `NOT (status = 'deleted')` |

#### NULL Check and Boolean Values {#null-check-and-boolean-values}

| Syntax           | Meaning           | Example                      |
|------------------|-------------------|------------------------------|
| `IS NULL`        | Is missing value  | `bill_length_mm IS NULL`     |
| `IS NOT NULL`    | Is not missing    | `bill_length_mm IS NOT NULL` |
| `true` / `false` | Boolean values    | `active = true`              |

#### Column Names with Spaces or Special Characters {#column-names-with-spaces-or-special-characters}

Enclose column names in double quotes:

```
"Body Mass (g)" > 4000
```

### Filter Examples {#filter-examples}

```
# Numeric condition
body_mass_g > 4000

# String condition (enclose in single quotes)
species = 'Chinstrap'

# Combining multiple conditions
species = 'Adelie' and body_mass_g > 3500

# Excluding missing values
bill_length_mm IS NOT NULL

# Pattern matching (partial match)
island LIKE '%Dream%'

# Matching multiple values
species IN ('Adelie', 'Gentoo')

# Range specification
body_mass_g BETWEEN 3500 AND 4500
```

For example, filtering with `species IN ('Adelie', 'Gentoo')` displays only the matching rows.

![Display after applying filter](../shared/images/data-table-filter.webp)

### Saving Filtered Results as a Dataset {#save-filtered-data}

When a filter is active, a **Save Filtered Data** button appears next to the filter input. Clicking it opens a dialog where you name the filtered result and save it as a [derived dataset](datasets). The saved dataset opens in a new tab.

## Sort Feature {#sort-feature}

Click the sort button on a column header to sort data by that column.

### Single Column Sort {#single-column-sort}

- 1 click: Ascending order
- 2 clicks: Descending order
- 3 clicks: Remove sort

### Multi-Column Sort {#multi-column-sort}

Hold Ctrl/Cmd while clicking to sort by multiple columns.

- Ctrl/Cmd+click to add a sort condition (ascending)
- Ctrl/Cmd+click the same column again to switch to descending
- Ctrl/Cmd+click once more to remove the sort

During multi-column sort, priority numbers are displayed on sort buttons (e.g., 1, 2). When you remove a sort condition, the priority numbers of the remaining columns are renumbered. Clicking any column header without Ctrl/Cmd clears the multi-column sort and switches to a single-column sort on that column.

## Row Selection {#row-selection}

Selecting rows in the Data Table synchronizes the selection state with other tabs (Statistics, Graph Builder, etc.).

### Selection Methods {#selection-methods}

- **Single row**: Click a row
- **Range selection**: Hold Shift while clicking
- **Add to selection**: Hold Ctrl/Cmd while clicking
- **Clear row selection**: Click the Clear rows button in the [Selected Rows](selected-rows) tab

Selected rows are highlighted on graphs in the Statistics tab and Graph Builder. Row selection does not affect statistics calculations. To restrict which rows statistics are computed on, use a [filter](#filter-feature). See [Row Selection](row-selection) for details on cross-tab synchronization and saving selections as datasets.

## Dataset Operations {#dataset-operations}

### Viewing Metadata {#viewing-metadata}

Click the ⓘ button next to the dataset name to view basic information about the dataset (dataset name, type, row count, column count).

### Column Context Menu {#column-context-menu}

Right-click a column header to open the context menu.

- **Edit Column Name**: Rename the column.
- **Edit Scale of Measurement**: Change the [measurement scale](concepts-data-types). The measurement scale affects which statistics are shown in the Statistics tab and which graph types are available in Graph Builder.
- **Convert Column Types...**: Open the type conversion tab. See [Column Type Conversion](column-type-conversion) for details.
- **Normalize Variants...**: Shown for string and enum columns. Opens a tab for fixing variant spellings, such as differences in letter case or whitespace.
- **Number Format...**: Set the display format for a numeric column (float64 or int64). Choose from presets like fixed decimals, comma grouping, or significant digits. This overrides the default format set in Settings > Display. The format only affects how values are displayed in the Data Table tab where it is set; exported data (CSV, TSV, JSON) always uses raw values.
- **Display as Link...**: Embeds column values into a URL template and displays them as links. Links are rendered only when the data source is trusted. For data loaded from a URL, add the source URL to Trusted URLs in Settings to enable links. For columns with link display configured, this item changes to **Remove Link Display**.

The default number format is set in **Settings > Display** and applies to data tables and SQL Editor preview. You can choose a preset or enter a custom format string using Python-compatible format spec syntax (e.g., `,.2f` for comma-separated with 2 decimal places, `.4g` for 4 significant digits).

### Table Menu {#table-menu}

Click the menu button (⋮) at the top right of the table to access dataset operations.

![Table menu](../shared/images/data-table-menu.webp)

- **Edit Data**: Edit cell values, add rows, or delete rows ([Primary datasets](datasets) only)
- **Add to Report**: Add the table to a [report](report)
- **Export**: Export data. See [Data Export](#data-export) for details
- **View SQL Query**: View the original SQL query ([derived datasets](datasets) only)
- **Materialize**: Save query results to the project file (MDS) (derived datasets only). Normally, derived dataset cache is discarded on save, but Materialize preserves it. Useful for computationally expensive small tables.
- **Reload Dataset...**: Reload data from the original file or URL. Opens a dialog where you select a CSV, TSV, or text file to reload. For datasets loaded from a URL, the **Reload from URL** button in the dialog fetches the latest data from the original URL. Row count changes are accepted, but the column structure must match the original dataset: column count, column names, column order, and data types must all be identical. If they do not match, an error message showing the details of the differences is displayed and the dataset is not updated. If the column structure has changed, such as columns being added or removed, [import](data-preparation) the file as a new dataset instead. Reloading clears all excluded rows and row comments. On successful reload, dependent derived datasets are automatically recalculated. For [derived datasets](datasets), this item appears as **Reload Source Dataset...** and reloads the source Primary dataset. If there are multiple source Primary datasets, a dialog opens first to select which one to reload

## Data Export {#data-export}

Select **Export** from the table menu to export the dataset in CSV, TSV, or JSON format. Only rows matching the current filter are exported, in the current sort order. To export all data, clear the filter first. The row number column is not included.

![Export Data dialog](../shared/images/export-data-modal.webp)

**File Name** - Specify the output file name. The file is downloaded with the name you enter plus the extension for the selected format, shown to the right of the input. The input starts with a default value that you can edit freely.

**File Format** - Select the output format.

| Format | Description |
|--------|-------------|
| CSV | Comma-separated values. A widely supported format for spreadsheets and other tools |
| TSV | Tab-separated values. Useful when your data contains commas |
| JSON | Array of objects. Programs can read this format directly |

**Encoding** - Select the character encoding. Available for CSV and TSV. JSON always uses UTF-8.

| Encoding | Use case |
|----------|----------|
| UTF-8 | Standard encoding supported by most tools |
| Shift-JIS (CP932) | Opens without garbled characters in Excel on Japanese systems |
| EUC-JP | An encoding used by some Unix-based tools |

When exporting with Shift-JIS or EUC-JP, if the data contains characters that cannot be represented in the selected encoding (such as emoji or certain accented characters), a warning dialog appears. Choose **Export anyway** to continue, or **Cancel** to abort the export. To export in UTF-8 instead, cancel and change the Encoding setting. If you continue, unrepresentable characters are replaced with HTML character references (e.g. `&#233;`).

**Add BOM** - Adds a byte order mark when UTF-8 is selected. Prevents garbled characters when opening UTF-8 CSV files in Excel.

**Include column headers** - Outputs column names in the first row. Available for CSV and TSV.

**Export selected rows only** - Shown when [rows are selected](row-selection). When checked, only the selected rows are exported. Selected rows are exported in the original row number order, not the current sort order.

### Missing Values {#missing-values-in-export}

Missing values are output as empty fields in CSV and TSV formats. In JSON, they are output as `null` literals.

## Row Number Column {#row-number-column}

The leftmost column displays row numbers. These row numbers indicate the original data order and do not change when filters or sorting are applied.

## Project Save State {#project-save-state}

Filter expressions and sort order are saved to the project file (MDS). When you reopen the project, the previous filter and sort settings are restored. Row selections are not saved.

## Next steps {#next-steps}

- **[Basic Statistics](basic-statistics)** - View statistics for selected columns
- **[Data Processing with SQL Editor](sql-editor)** - Process data with SQL

## See also {#see-also}

- **[Data Preparation and Import](data-preparation)** - About data types and measurement scales
