A previous release had provenance metadata, but this release does not. View details.
modify-csv
Apply a user-provided Python function to every cell in one CSV data row, every cell in one column, or one cell. The CSV's first record is treated as its header and is never modified. Row and column indexes are zero-based; columns can also be addressed by their exact header text.
Install
Install a published release from PyPI:
python -m pip install modify-csv
Script contract
The supplied script must define exactly this callable shape:
from typing import Any
def eval(content: Any, row: int, col: int) -> Any:
return content
Any is provided by Python's standard-library typing module. The function
name, parameter names, and three-argument shape are enforced.
content is the current CSV field (initially a string), while row and col
are zero-based numeric indexes into the data records and columns. The returned
value is passed to Python's CSV writer. The script is ordinary trusted Python
and executes with the same permissions as the command.
Examples
Apply a script file to a column selected by header:
modify-csv apply input.csv output.csv --script-file normalize.py --column email
Apply inline code to data row 2:
modify-csv apply input.csv output.csv \
--script 'def eval(content, row, col): return content.strip()' \
--row 2
Apply inline code to the cell at data row 0 and column 1:
modify-csv apply input.csv output.csv \
--script 'def eval(content, row, col): return int(content) * 2' \
--cell 0 1
Exactly one of --script or --script-file, and exactly one of --row,
--column, or --cell, is required. Existing output files are protected;
pass --force to replace one.
Generate a ready-to-edit transformation script:
modify-csv template transform.py
Use --force to replace an existing template. Run modify-csv --help or the
help for either subcommand to see the required function signature. The original
form without the apply subcommand remains supported for compatibility.
Metadata
Release files for modify-csv 2026.10.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| modify_csv-2026.10.8.tar.gz | 6.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modify_csv-2026.10.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / modify_csv-2026.10.8.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | modify_csv-2026.10.8.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00b129cc30cafe41d46d6088ace2d18fd422be762212cca28c6e39f04b9ad5b8
|
|
BLAKE2b-256 checksum How to use checksums |
d991443060931f0537371b69cf80c75318820e5eeba0c0756090dd58cfa95c7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / modify_csv-2026.10.8-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | modify_csv-2026.10.8-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d061f13aa8ba646d9f2956c2c095d82135ba6e5e884e60c891141ffb9130618
|
|
BLAKE2b-256 checksum How to use checksums |
364e517a1cf791a46c07954c95686465f4e9db3b5b19a80123703944fa0a78ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for modify-csv 2026.10.8
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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 2026.10.4 2 files With provenance
- Added 2026.10.8 2 files Without provenance
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.