csvplait

Software Screenshot:
csvplait
Software Details:
Version: 0.1
Upload Date: 14 Apr 15
Developer: Rick Harris
Distribution Type: Freeware
Downloads: 2

Rating: nan/5 (Total Votes: 0)

csvplait is a Python tool for manipulating CSV files either interactively or via script.

Usage

Interactive

python csvplait.py

 # Read in the CSV
 > read myfile.csv

 # Pretty print the table
 > pp

 # Drop first 2 columns
 > drop 0 1

 # Keep first five columns (labeled 0 to 4)
 > slice 0 4

 # this -> This
 > titleize 0

 # foo -> bar
 > strsub foo bar 0 2

 > write fixedup.csv


Script

You can easily create a script by writing out your history to a file:

> history script.csvplait

If you want to make your script even more programatic, you can add variables using a bash-like syntax:

 cat script.csvplait
read $FILENAME
drop 0
write $FILENAME.fixedup


Then, to invoke the script, run csvplait with the script as an argument as well as any environment variables that the script uses:

 python csvplait.py script.csvplait FILENAME=sept.csv

Requirements:

  • Python

Similar Software

NiceCommits
NiceCommits

20 Feb 15

git-sweep
git-sweep

14 Apr 15

Apache Subversion
Apache Subversion

16 Aug 18

xdelta
xdelta

3 Jun 15

Comments to csvplait

Comments not found
Add Comment
Turn on images!