{"id":17200689,"url":"https://github.com/pereorga/csvshuf","last_synced_at":"2025-04-13T20:52:04.855Z","repository":{"id":62565754,"uuid":"60126577","full_name":"pereorga/csvshuf","owner":"pereorga","description":"Randomize cells within columns in a CSV file. Like GNU shuf, but for CSV.","archived":false,"fork":false,"pushed_at":"2018-07-17T16:58:40.000Z","size":26,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T01:49:47.681Z","etag":null,"topics":["command-line","command-line-tool","console-application","csv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pereorga.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-31T22:00:11.000Z","updated_at":"2023-12-06T09:37:52.000Z","dependencies_parsed_at":"2022-11-03T16:00:20.299Z","dependency_job_id":null,"html_url":"https://github.com/pereorga/csvshuf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pereorga%2Fcsvshuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pereorga%2Fcsvshuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pereorga%2Fcsvshuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pereorga%2Fcsvshuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pereorga","download_url":"https://codeload.github.com/pereorga/csvshuf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782280,"owners_count":21160716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","command-line-tool","console-application","csv"],"created_at":"2024-10-15T02:09:24.789Z","updated_at":"2025-04-13T20:52:04.833Z","avatar_url":"https://github.com/pereorga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"csvshuf\n=======\n\nShuffle cells by column in CSV files.\n\nUsage\n-----\n\n.. code-block:: bash\n\n    usage: csvshuf [-h] [-s] [-c COLUMNS | -C NO_COLUMNS] [-d DELIMITER | -t]\n                   [-q QUOTECHAR] [-o OUTPUT_DELIMITER] [-v]\n                   [FILE]\n\n    positional arguments:\n      FILE                  Input CSV file. If omitted, read standard input.\n\n    optional arguments:\n      -s, --sattolo         Use Sattolo shuffle algorithm.\n      -c COLUMNS, --columns COLUMNS\n                            Comma-separated list of columns to include.\n      -C NO_COLUMNS, --no-columns NO_COLUMNS\n                            Comma-separated list of columns to exclude.\n      -d DELIMITER, --delimiter DELIMITER\n                            Input column delimiter.\n      -t, --tabbed          Delimit input with tabs.\n      -q QUOTECHAR, --quotechar QUOTECHAR\n                            Quote character.\n      -o OUTPUT_DELIMITER, --output-delimiter OUTPUT_DELIMITER\n                            Output column delimiter.\n\n\nExamples\n--------\n\nShuffle the first column of foobar.csv\n\n    csvshuf -c1 foobar.csv\n\nShuffle the third column of foobar.csv using Sattolo's algorithm\n\n    csvshuf -c3 -s foobar.csv\n\nShuffle all columns of foobar.csv\n\n    csvshuf foobar.csv\n\nShuffle all the columns but the first of foobar.csv\n\n    csvshuf -C1 foobar.csv\n\nShuffle the first and third columns of the first ten lines of foobar.csv\n\n    head -10 foobar.csv | csvshuf -c 1,3\n\nShuffle the first and third columns of the pipe-delimited foobar.csv\n\n    csvshuf -c1,3 -d \"|\" foobar.csv\n\nShuffle the first and third columns of the tab-delimited foobar.csv\n\n    csvshuf -c 1,3 -t foobar.csv\n\nShuffle the first three columns of the pipe-delimited foobar.csv; output\nwill be comma-delimited\n\n    csvshuf -c 1,2,3 -d \"|\" -o , foobar.csv\n\nShuffle the first three columns of the comma-delimited foobar.csv;\noutput will be pipe-delimited\n\n    csvshuf -c 1,2,3 -o \"|\" foobar.csv\n\nShuffle the first two columns of the comma-delimited, pipe-quoted\nfoobar.csv\n\n    csvshuf -c 1,2 -d \",\" -q \"|\" foobar.csv\n\n\nInstallation\n------------\n\n    pip install csvshuf\n\nor\n\n    pip3 install csvshuf\n\n\nAuthor\n------\n\nPere Orga pere@orga.cat, 2016.\n\nOriginally forked from csvcut (https://gist.github.com/bycoffe/187278).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpereorga%2Fcsvshuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpereorga%2Fcsvshuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpereorga%2Fcsvshuf/lists"}