Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curtisalexander/csvsubquery
Perform a subquery using CSV files with a common key.
https://github.com/curtisalexander/csvsubquery
Last synced: 1 day ago
JSON representation
Perform a subquery using CSV files with a common key.
- Host: GitHub
- URL: https://github.com/curtisalexander/csvsubquery
- Owner: curtisalexander
- License: mit
- Created: 2016-01-11T22:54:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T23:03:52.000Z (almost 9 years ago)
- Last Synced: 2023-09-02T04:43:37.402Z (about 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csvsubquery
Perform a subquery using CSV files with a common key. For more complex subquery logic, see [csvkit](https://github.com/onyxfish/csvkit).## Usage
```
csvsubquery.py [OPTIONS]Options:
--incsv FILENAME input csv (the larger of the csv files)
--subcsv FILENAME subquery csv (the smaller of the csv files)
--outcsv FILENAME output csv
--key TEXT key variable to be used for the subquery - must be same key name on incsv and subcsv
--help Show this message and exit.
```## Assumptions
Assumes the input CSV file has a header.## Example
```
csvsubquery.py --incsv /dir/to/infile.csv --subcsv /dir/to/subfile.csv --outcsv /dir/to/outfile.csv --key keyvar
```## Requirements
[click](http://click.pocoo.org) - command line library for Python`pip install click`
## Related
[csvkit](https://github.com/onyxfish/csvkit) - a suite of utilities for converting to and working with CSV