filter_data
Filter CSV data by applying column conditions to extract specific rows. Use simple value matching or complex operators like greater than, less than, and text contains to refine your dataset.
Instructions
Filter CSV data based on conditions.
Args:
filename: Name of the CSV file
conditions: Dictionary of column conditions.
Simple: {"column": "value"}
Complex: {"column": {"gt": 5, "lt": 10, "contains": "text"}}
limit: Optional limit on number of rows to return
Returns:
Dictionary with filtered data
Input Schema
Name | Required | Description | Default |
---|---|---|---|
conditions | Yes | ||
filename | Yes | ||
limit | No |
Input Schema (JSON Schema)
{
"properties": {
"conditions": {
"additionalProperties": true,
"title": "Conditions",
"type": "object"
},
"filename": {
"title": "Filename",
"type": "string"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
}
},
"required": [
"filename",
"conditions"
],
"type": "object"
}