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.
Input
Output fields
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.
