csvsort


Namecsvsort JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://github.com/richardpenman/csvsort
SummarySort large CSV files on disk rather than in memory
upload_time2020-06-17 15:24:08
maintainer
docs_urlNone
authorRichard Penman
requires_python
licenselgpl
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========
CSV Sort
========

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
=============

.. sourcecode:: python

    >>> from csvsort 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_filename='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 and force quotes around every field (default is csv.QUOTE_MINIMAL)
    >>> import csv
    >>> csvsort('test4.csv', [0], quoting=csv.QUOTE_ALL) 

..


=======
Install
=======

Supports python 2 & 3:

.. sourcecode:: bash

    $ pip install csvsort
    $ pip3 install csvsort

..
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/richardpenman/csvsort",
    "name": "csvsort",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Richard Penman",
    "author_email": "richard.penman@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/da/b8/f16eddfcf3f0dccfff358167d19ea61b83c8636ef5ba612f52c6ffbb2587/csvsort-1.6.1.tar.gz",
    "platform": "",
    "description": "========\nCSV Sort\n========\n\nFor 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.\n\n\n=============\nExample usage\n=============\n\n.. sourcecode:: python\n\n    >>> from csvsort import csvsort\n    >>> # sort this CSV on the 5th and 3rd columns (columns are 0 indexed)\n    >>> csvsort('test1.csv', [4,2])  \n    >>> # sort this CSV with no header on 4th column and save results to separate file\n    >>> csvsort('test2.csv', [3], output_filename='test3.csv', has_header=False)  \n    >>> # sort this TSV on the first column and use a maximum of 10MB per split\n    >>> csvsort('test3.tsv', [0], max_size=10, delimiter='\\t')  \n    >>> # sort this CSV on the first column and force quotes around every field (default is csv.QUOTE_MINIMAL)\n    >>> import csv\n    >>> csvsort('test4.csv', [0], quoting=csv.QUOTE_ALL) \n\n..\n\n\n=======\nInstall\n=======\n\nSupports python 2 & 3:\n\n.. sourcecode:: bash\n\n    $ pip install csvsort\n    $ pip3 install csvsort\n\n..",
    "bugtrack_url": null,
    "license": "lgpl",
    "summary": "Sort large CSV files on disk rather than in memory",
    "version": "1.6.1",
    "project_urls": {
        "Homepage": "https://github.com/richardpenman/csvsort"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dab8f16eddfcf3f0dccfff358167d19ea61b83c8636ef5ba612f52c6ffbb2587",
                "md5": "a2774219450189f688c1215215db4e02",
                "sha256": "b2d34042979cd843c29c50ff6cd8e62579e9e0008b7551fbb11f06cfe41004ab"
            },
            "downloads": -1,
            "filename": "csvsort-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a2774219450189f688c1215215db4e02",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3496,
            "upload_time": "2020-06-17T15:24:08",
            "upload_time_iso_8601": "2020-06-17T15:24:08.699727Z",
            "url": "https://files.pythonhosted.org/packages/da/b8/f16eddfcf3f0dccfff358167d19ea61b83c8636ef5ba612f52c6ffbb2587/csvsort-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-06-17 15:24:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "richardpenman",
    "github_project": "csvsort",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "csvsort"
}
        
Elapsed time: 4.32407s