sort_data
Sort CSV data by specified columns with options for ascending/descending order and row limits to organize your data efficiently.
Instructions
Sort CSV data by specified columns.
Args:
filename: Name of the CSV file
columns: Column name or list of column names to sort by
ascending: Whether to sort in ascending order
limit: Optional limit on number of rows to return
Returns:
Dictionary with sorted data
Input Schema
Name | Required | Description | Default |
---|---|---|---|
ascending | No | ||
columns | Yes | ||
filename | Yes | ||
limit | No |
Input Schema (JSON Schema)
{
"properties": {
"ascending": {
"default": true,
"title": "Ascending",
"type": "boolean"
},
"columns": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Columns"
},
"filename": {
"title": "Filename",
"type": "string"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
}
},
"required": [
"filename",
"columns"
],
"type": "object"
}