https://github.com/jasonmccallister/unique
A CLI to count of number unique values within a column in a CSV
https://github.com/jasonmccallister/unique
cli csv go unique
Last synced: 6 months ago
JSON representation
A CLI to count of number unique values within a column in a CSV
- Host: GitHub
- URL: https://github.com/jasonmccallister/unique
- Owner: jasonmccallister
- Created: 2019-09-20T12:37:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-28T15:32:38.000Z (over 6 years ago)
- Last Synced: 2025-09-25T02:58:53.467Z (6 months ago)
- Topics: cli, csv, go, unique
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unique
Unique is a Go package used to determine the count of unique rows within a CSV. It is made to be used on the command line.
## Installation
Using Go, and if you have `$GOPATH/bin` in your path, you can install using:
```bash
go get -u github.com/jasonmccallister/unique
```
Alternatively, you can [visit the releases](https://github.com/jasonmccallister/unique/releases) page and download the binary for your Operating System.
## Usage
The only required argument for `unique` is the path to the file.
```bash
unique orders.csv
```
Output:
```bash
CSV processed!
Here are your results:
Using Column: 0
Total Uniques: 2
Total Rows: 4
```
> The above command will default to using the first column (`0`) of the CSV as the row.
### Specifying the Column
If you need to specify the column, you can pass that as a flag.
```bash
unique orders.csv -column=2
```
_**Note**: If you have a large dataset, its best to limit the number of columns. For example, export only the primary key and the value you need to find the uniques._
## Security
If you discover any security related issues, please email themccallister@gmail.com instead of using the issue tracker.
## Credits
- [Jason McCallister](https://github.com/jasonmccallister)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
Brought to you by [Jason McCallister](https://mccallister.io)