Skip to main content

CSV Sorter

Fork of the csvsort for Python 3. For sorting CSV files on disk that do not fit into memory. The merge sort algorithm is used to break up the original file into smaller chunks, sort these in memory, and then merge these sorted files.

Example usage

>>> from csvsorter import csvsort
>>> # sort this CSV on the 5th and 3rd columns (columns are 0 indexed)
>>> csvsort('test1.csv', [4,2])
>>> # sort this CSV with no header on 4th column and save results to separate file
>>> csvsort('test2.csv', [3], output_file='test3.csv', has_header=False)
>>> # sort this TSV on the first column and use a maximum of 10MB per split
>>> csvsort('test3.tsv', [0], max_size=10, delimiter='\t')
>>> # sort this CSV on the first column, force quotes around every field (default is csv.QUOTE_MINIMAL) and use windows-1250 encoding
>>> import csv
>>> csvsort('test4.csv', [0], quoting=csv.QUOTE_ALL, encoding='windows-1250')

Install

$ pip install csvsorter

Metadata

Release files for csvsorter 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csvsorter 1.4
File Size Uploaded Provenance Actions
csvsorter-1.4.tar.gz 3.3 kB Without provenance Details for csvsorter-1.4.tar.gz

Release files / csvsorter-1.4.tar.gz

Download URL csvsorter-1.4.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2b3c6a944f8541e76ff18d2b14f672a3a936cff5ce7e54a0d4fe1ce90e9248ff
BLAKE2b-256 checksum
How to use checksums
a7b533f8c2541df92aec7dccbf90e5bc0ecdd8f5f86481e57c8eff80e8e7df3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for csvsorter 1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page