---
title: "Filter"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/data/filter
markdown: https://docs.nodetool.ai/nodes/nodetool/data/filter.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/data/filter.md
---

# Filter

**Type:** `nodetool.data.Filter`

**Namespace:** `nodetool.data`

## Description

Filter dataframe based on condition.
    filter, query, condition

    Example conditions:
    age > 30
    age > 30 and salary < 50000
    name == 'John Doe'
    100 <= price <= 200
    status in ['Active', 'Pending']
    not (age < 18)

    Use cases:
    - Extract subset of data meeting specific criteria
    - Remove outliers or invalid data points
    - Focus analysis on relevant data segments

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| df | `dataframe` | The DataFrame to filter. | `{"type":"dataframe","uri":"","asset_id":null,"d...` |
| condition | `str` | The filtering condition to be applied to the DataFrame, e.g. column_name > 5. | `` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `dataframe` |  |

## Related Nodes

Browse other nodes in the [nodetool.data](./) namespace.
