Sort huge csv files.
Project description
Disk CSV Sort
Description
Sort huge CSV files using disk space and RAM together.
For now support only CSV files with header.
Usage
Sort CSV file path/to/file.csv
by column Some Column
.
from pathlib import Path
from diskcsvsort import CSVSort
csvsort = CSVSort(
src=Path('path/to/file.csv'),
key=lambda row: row['Some Column'],
)
csvsort.apply()
CLI
Sort CSV file path/to/file.csv
by columns col1
and col2
.
col1
will be converted to python str
and col2
will be converted to python int
.
python -m diskcsvsort path/to/file.csv --by col1:str --by col2:int
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
diskcsvsort-0.1.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
Close
Hashes for diskcsvsort-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01e27a868a25435848e1092167985177b6b863a5b03d4d48444c70fff6ce7d6c |
|
MD5 | d0f27464c65b02f945d3efc7ce6bb96d |
|
BLAKE2b-256 | 5c807f5495668d009d220086a48c9503be39b1006d670289f94a35ed89104dd5 |