Comma Seperated Python Value parsing
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-21 22:36:30 -07:00
.forgejo/workflows Example workflow 2026-09-21 22:36:30 -07:00
.gitignore Initial commit 2026-09-21 22:34:28 -07:00
cspvtocsv.py Initial commit 2026-09-21 22:34:28 -07:00
README.md Initial commit 2026-09-21 22:34:28 -07:00

Comma Seperated Python Values

A CSPV file is essentially a CSV file except that values may be python commands, as interpreted using the Pandas library. The script reads a CSPV file as input and then outputs a CSV file where the results from the pandas equations overwrite the original expressions. This allows for the use of OpenDocument Spreadsheet inspired equations embedded within a CSV while still maintaining the advantages of plain text, including the ability to easily track changes in git.

Usage

Simply run the script using the flag -f or --file to specify input CSPV file name and optionally -o or --ouput to specify output CSV file name. If no output file flag is provided, it will output the file to the same file name as input, except with the extension changed to .csv. It is not required for the input file to follow the implied .cspv extension, and .csv may be preffered to allow for CSV preview usage built into certain IDE programs.

Example

python cspvtocsv.py -f '.test.cspv' -o 'test.csv'

Using with workflows

An example workflow has been provided for how to monitor changes to .cspv. files an run the program on changed files.