Go to example tasks

Sort a CSV file and keep the top 10 rows

Sort any CSV by one or more columns, numbers as numbers, and keep only the top rows and the columns you need. This example returns the 10 strongest earthquakes of the past week from the USGS feed, largest first. Swap in your own file, sort columns and row count.

Try for free
Dataset Transformer: Filter, Dedupe, JSON to CSV
Dataset Transformer: Filter, Dedupe, JSON to CSVhumble-echidna/dataset-transform
Time
Magnitude
Place
Depth (km)
+1 field
Text
Number
Boolean
List
Object

Input

Or: file URL or upload (CSV, JSON, JSONL or Excel):https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.csv
Sort by:mag desc
Max rows per run:10
Fields to keep (and rename):time+4

Output fields

Time
Magnitude
Place
Depth (km)
Event id

How it works

Sign up on Apify or log in

The Dataset Transformer: Filter, Dedupe, JSON to CSV Actor is ready to run with the inputs already set for "Sort a CSV file and keep the top 10 rows". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "Sort a CSV file and keep the top 10 rows" task

The Dataset Transformer: Filter, Dedupe, JSON to CSV Actor will start running based on the input automatically. You can also change all the input fields, like or: file url or upload (csv, json, jsonl or excel), sort by, and more, to match your specific use case.

Receive the "Sort a CSV file and keep the top 10 rows" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as time, magnitude, place, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Sort a CSV file and keep the top 10 rows" task via API.

Image

Integrate "Sort a CSV file and keep the top 10 rows" into your workflow

Connect "Sort a CSV file and keep the top 10 rows" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay