{"id":22173492,"url":"https://github.com/jlumbroso/comma","last_synced_at":"2026-03-05T23:35:43.674Z","repository":{"id":40277283,"uuid":"264093291","full_name":"jlumbroso/comma","owner":"jlumbroso","description":"Python CSV, and delimiter-spaced files, for humans!","archived":false,"fork":false,"pushed_at":"2022-05-17T02:06:33.000Z","size":1323,"stargazers_count":95,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-06T06:37:56.749Z","etag":null,"topics":["csv-library","csv-parsing","python"],"latest_commit_sha":null,"homepage":"https://comma.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlumbroso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-15T04:12:11.000Z","updated_at":"2025-12-25T04:20:07.000Z","dependencies_parsed_at":"2022-08-23T16:40:49.267Z","dependency_job_id":null,"html_url":"https://github.com/jlumbroso/comma","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlumbroso/comma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlumbroso%2Fcomma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlumbroso%2Fcomma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlumbroso%2Fcomma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlumbroso%2Fcomma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlumbroso","download_url":"https://codeload.github.com/jlumbroso/comma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlumbroso%2Fcomma/sbom","scorecard":{"id":523689,"data":{"date":"2025-08-11","repo":{"name":"github.com/jlumbroso/comma","commit":"d7669e59ae8480a84abf2ff89142ee243e5ddbd9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/dependencies-update.yaml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependencies-update.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/dependencies-update.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependencies-update.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/dependencies-update.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependencies-update.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/dependencies-update.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependencies-update.yaml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/dependencies-update.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependencies-update.yaml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/dependencies-update.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jlumbroso/comma/main.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T03:45:39.056Z","repository_id":40277283,"created_at":"2025-08-20T03:45:39.056Z","updated_at":"2025-08-20T03:45:39.056Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30155487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csv-library","csv-parsing","python"],"created_at":"2024-12-02T07:33:44.582Z","updated_at":"2026-03-05T23:35:43.635Z","avatar_url":"https://github.com/jlumbroso.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comma: A Python CSV Library for Humans\n\n![pytest](https://github.com/jlumbroso/comma/workflows/pytest/badge.svg)\n [![codecov](https://codecov.io/gh/jlumbroso/comma/branch/master/graph/badge.svg)](https://codecov.io/gh/jlumbroso/comma)\n [![Documentation Status](https://readthedocs.org/projects/comma/badge/?version=latest)](https://comma.readthedocs.io/en/latest/?badge=latest)\n [![Downloads](https://pepy.tech/badge/comma)](https://pepy.tech/project/comma)\n [![Run on Repl.it](https://repl.it/badge/github/jlumbroso/comma)](https://repl.it/github/jlumbroso/comma)\n [![Stargazers](https://img.shields.io/github/stars/jlumbroso/comma?style=social)](https://github.com/jlumbroso/comma)\n\nThis library tries to make manipulating CSV files a great experience.\n\n![Example session](https://raw.githubusercontent.com/jlumbroso/comma/master/example-screenshot.png)\n\n## Features\n\nHere are some of the features that `comma` supports:\n\n- Robust autodetection of CSV parameters\n(thanks to [`clevercsv`](https://github.com/alan-turing-institute/CleverCSV)) and\nencoding (thanks to [`chardet`](https://github.com/chardet/chardet)).\n- Single-line usage, `comma.load(...)`, no syntax to remember or parameters to tweak.\n- Simple, Pythonic interface to access/modify the rows using standard `list` and\n`dict` operations, i.e. `row[0]` and `row[\"street\"]` are equivalent.\n- Column slices using the header name, i.e. `table[\"street\"]`.\n- In-place editing of the dataset, including multiple lines.\n- Opening files directly from an URL.\n\n## Installation\n\nIf you use pip:\n```shell script\npip install 'comma[autodetect,net]'\n```\nor if you use pipenv:\n```shell script\npipenv install 'comma[autodetect,net]'\n```\n\n## Why?\n\nAlthough Python, fortuitously, is\n\"[batteries included](https://www.python.org/dev/peps/pep-0206/#batteries-included-philosophy)\",\non occasion, some of the libraries end up being designed with APIs\nthat don't map well to what turns out to be the most common usage\npatterns. This is what happened with the various `urllib` libraries,\nincredibly powerful, but limiting users by its complexity---it was\nnot straightforward, for instance, to use cookies: One of several\nproblems that [`requests`](https://github.com/psf/requests) by\n[@ken-reitz](https://github.com/ken-reitz) addressed. Indeed,\n`requests` abstracts power beneath simplicity, smart defaults, and\ndiscoverability.\n\nFor the CSV format, we are confronted with a similar situation. While\nboth the JSON and YAML formats have packages that provide, one-command\nmeans to load content from files in those respective formats to a\nnested Python object, for the CSV format,\n[the standard library](https://www.python.org/dev/peps/pep-0305/) has\nyou use an iterator to access the data. Many details require significant\nsyntax change (for instance the difference between having lists or\ndictionaries depends on the class that is used to read the file).\n\nSince then, we also have several excellent libraries that, by providing\ngreat auto-detection (of dialect, file format, encoding, etc.) allow\nfor hiding many details from the end user.\n\nAll this to say, `comma` will try to do exactly what you want\nwhen you do:\n\n```python\nimport comma\ndata = comma.load(\"file.csv\")\ndata[0][\"field\"] = \"changed value\"\ncomma.dump(data, filename=\"file_modified.csv\")\n``` \n\n## Alternatives\n\nPython is fortunate to have a lot of very good libraries to read/write\nCSV and tabular files in general. (Some of these were discovered through\nthe excellent [Awesome Python](https://awesome-python.com/) list.)\n\n- [`clevercsv`](https://github.com/alan-turing-institute/CleverCSV): An\n  exceptional library by [@GjjvdBurg](https://github.com/GjjvdBurg),\n  builds on statistical and empirical\n  to provide powerful and reliable CSV dialect detection. However, it\n  strives to be a drop-in replacement for the original Python `csv`\n  module, and as such does not improve on the complex syntax. This\n  library is [the culmination of serious peer-reviewed\n  research](https://arxiv.org/abs/1811.11242), and `comma` uses it\n  internally to improve auto-detection.\n  \n- [`csvkit`](https://github.com/wireservice/csvkit): This is a set of\n  command-line tools (rather than a module/package) written in Python,\n  to make it easier to manipulate CSV files. One of the highlights is\n  a tool called `csvpy \u003cfile.csv\u003e` to open a Python shell with the CSV\n  data loaded into a Python object called `reader`, to quickly run\n  some Python logic on the data. While it is technically possible to\n  use `csvkit`'s internals in a project, this is not documented.\n  \n- [`pandas`](https://github.com/pandas-dev/pandas): An advanced data\n  science package for Python, this certainly provides a powerful CSV\n  (and more generally, table file) reader and parser. The API of the\n  table object is very powerful, but you need to take the time to learn\n  how to use it. This library is perhaps not ideal for file manipulations.\n\n- [`pyexcel`](https://github.com/pyexcel/pyexcel): This library provides\n  access to Excel and other tabular formats, including CSV, and various\n  data sources (stream, database, file, ...). It emphasizes one common\n  format-agnostic API, that instead has the user choose the data format\n  (list, matrix, dictionary, ...).\n\n- [`tablib`](https://github.com/jazzband/tablib/): This library was\n  originally written by [Kenneth Reitz](https://github.com/ken-reitz),\n  the creator who brought [`requests`](https://github.com/psf/requests),\n  [`pipenv`](https://github.com/pypa/pipenv) and many other goodies to\n  Python---and then included in the [Jazzband](https://jazzband.co/)\n  collective. The focus of this library is on interoperating between many\n  different file formats (such as XLS, CSV, JSON, YAML, DF, etc., ...,\n  even LaTeX `booktabs`!). It seems to have a very high adoption rate\n  because it is a dependency for many Jazzband libraries. The API is\n  class-based rather than method-based. A companion library,\n  [`prettytable`](https://github.com/jazzband/prettytable) focuses on\n  pretty printing tabular data (including from a CSV file).\n\n- [`tabulator`](https://github.com/frictionlessdata/tabulator-py): This\n  library provides a single interface to manipulate extremely large\n  tabular data---and useful for files so large that they need to be\n  streamed line-by-line; the library supports a broad array of formats\n  including reading data directly from Google Spreadsheets. However\n  this power means that reading a CSV file requires several operations.\n\nAlthough not specifically restricted to Python, the\n[AwesomeCSV](https://github.com/secretGeek/AwesomeCSV) resource is also\ninteresting.\n\n### Miscellaneous\n\nAlthough not specifically a Python library, nor designed to read/write CSV\nfiles (but instead to compare them), [`daff`](https://github.com/paulfitz/daff)\nis a really cool project: It provides a `diff` of tabular data [with cell-level\nawareness](http://specs.frictionlessdata.io/tabular-diff/).\n\nAnother unrelated project is [Grist](https://www.getgrist.com/), a spreadsheet\nPaaS, which among other useful features, allows [the use of Python within\nformulas](https://support.getgrist.com/formulas/). \n\n## Acknowledgements\n\nThanks to [@zbanks](https://github.com/zbanks) for the name of the package!\nThanks to [@rfreling](https://github.com/rfreling),\n[@adamfinkelstein](https://github.com/adamfinkelstein) for discussing ideas\nbefore I got started on this. Thanks to [@GjjvdBurg](https://github.com/GjjvdBurg)\nand collaborators for awesome, awesome contribution to text processing science\nand our Python community with `clevercsv`. \n\n## License\n\nThis project is licensed under the LGPLv3 license, with the understanding\nthat importing a Python modular is similar in spirit to dynamically linking\nagainst it.\n\n- You can use the library `comma` in any project, for any purpose, as long\n  as you provide some acknowledgement to this original project for use of\n  the library.\n\n- If you make improvements to `comma`, you are required to make those\n  changes publicly available.\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlumbroso%2Fcomma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlumbroso%2Fcomma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlumbroso%2Fcomma/lists"}