csvplus
Create, Read, Update, Delete, and Move Rows in a CSV File
install
pip install csvplus
usage
import csvplus
filepath = "./folder/cars.csv"
# create csv with the given column names
csvplus.create(filepath, ["make","model","year"])
# append a new row to the end of the csv file
csvplus.add(filepath, { "make": "Kia", "model": "Soul", "year": 2023 })
# delete all rows matching the where conditions
csvplus.delete(filepath, where={ "make": "Tesla" })
# find all rows matching the where conditions
csvplus.read("countries.csv", where={ "year": 1776 })
[{ "name": "United States of Ameriac", "abbreviation": "USA", "year": 1776 }]
# move rows
move(filepath, from_row, to_row, debug_level=0, quoting=csv.QUOTE_ALL):
csvplus.move("example.csv", 0, 20) # move the first row to the 20th line
Metadata
Release files for csvplus 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| csvplus-0.0.2.tar.gz | 6.6 kB | Details |
Release files / csvplus-0.0.2.tar.gz
| Download URL | csvplus-0.0.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dedbfa4e7534ca492ba5fa51c90563dbd8509a842200a1176e5e99ed67ee3ed4
|
|
BLAKE2b-256 checksum How to use checksums |
8f007d72308c15d238b9d2f02d00041487b97c905bce649075f8c24561214450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|