Disk CSV Sort
Description
Sort huge CSV files using disk space and RAM together.
For now support only CSV files with header.
Usage
For example
CSV file with movies
| name | year |
|---|---|
| Batman Begins | 2005 |
| Blade Runner 2049 | 2017 |
| Dune | 2021 |
| Snatch | 2000 |
Sort this CSV file that stored in movies.csv by year and name.
Note: order of columns is matter during sorting.
Using diskcsvsort package
from pathlib import Path
from diskcsvsort import CSVSort
csvsort = CSVSort(
src=Path('movies.csv'),
key=lambda row: (int(row['year']), row['name']),
)
csvsort.apply()
Using diskcsvsort CLI
python -m diskcsvsort movies.csv --by year:int --by name:str
Note: columns year and name will be converted to int and str, respectively.
Available types:
- str
- int
- float
- datetime
- date
- time
Types usage:
- str:
column:str - int:
column:int - float:
column:float - datetime:
column:datetime(%Y-%m-%d %H:%M:%S) - date:
column:datetime(%Y-%m-%d) - time:
column:datetime(%H:%M:%S)
Algorithm
TODO
Metrics
TODO
Metadata
Release files for diskcsvsort 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diskcsvsort-0.1.1.tar.gz | 10.9 kB | Without provenance | Details for diskcsvsort-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diskcsvsort-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for diskcsvsort-0.1.1-py3-none-any.whl |
Total release size: 20.0 kB
Release files / diskcsvsort-0.1.1.tar.gz
| Download URL | diskcsvsort-0.1.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6b9bfbc9c08a9d9f38cd22c3aaf40e1064137f2a3a7de40f6471af27c26af7a
|
|
BLAKE2b-256 checksum How to use checksums |
326bbb2abd3af42692ace817f3418c5b0ef3fdbcb20e4f1e745abbcdbdb4c4ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.10.0 Windows/10
|
Release files / diskcsvsort-0.1.1-py3-none-any.whl
| Download URL | diskcsvsort-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dab56c5b5dd381792c544f9b24f32de0e06939b3a8c9c99be1104892bae2a5d5
|
|
BLAKE2b-256 checksum How to use checksums |
1de02037b4741af3729e72948a212c3f186fc47741bc07c1304496392f07454c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.10.0 Windows/10
|
Security for diskcsvsort 0.1.1
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.