csvtools
csvtools copied to clipboard
GNU-alike tools for parsing RFC 4180 CSVs at high speed.
As of now `csvgrep` only supports column names as pattern key. This PR adds support for column indexes. I did not went for a new option (aka -P) as it...
I would like to sort a 300 MB CSV with a header (https://data.open-power-system-data.org/renewable_power_plants/2018-03-08/renewable_power_plants_DE.csv) by it's 7th column _electrical_capacity_ which contains numerical values: ``` 0.075 0.02937 0.4 0.303 ``` How could...
Add ability to space out columns so they are easy to look at. For delight: cat file.csv | csvcut -K 0,1 | csvlook
Use [reservoir sampling](https://en.wikipedia.org/wiki/Reservoir_sampling) to randomly keep N rows in a streaming fashion. Print them in the end. Implementation should be fairly simple, reuse the `csv_tokenizer` and (sadly) allocate memory for...
Great stuff! What are your thoughts on a csvlook implementation? I imagine it would read the first 100 rows or so and find out the max length of each column...
Perhaps an option to the `csvawk` to process to output to revert the `\x1F` back to the normal separator in case the awk command outputs original lines (instead of a...
CSV Tokenizer should be updated to more acuratly handle windows newlines, and not swallow empy rows.
Steps to reproduce: ```sh $ cd /tmp $ git clone https://github.com/DavyLandman/csvtools.git Cloning into 'csvtools'... remote: Enumerating objects: 1418, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (5/5),...