Colstats is a powerful command-line utility designed for efficient data processing and analysis of columnar data files. Developed in Go, this tool provides high performance and ease of use, making it a perfect choice for developers, data scientists, and system administrators.
- High Performance: Optimized for speed and low memory usage.
- Concurrency: Leverages Go's concurrency model to process multiple files simultaneously.
- Cross-Platform: Runs on Windows, macOS, and Linux.
- Flexible Input: Supports various input formats like CSV, TSV, and more.
- Basic Operations: Supports sum and average operations on specified CSV columns.
- Go 1.16 or higher
- Clone the repository:
git clone https://github.com/theakhandpatel/Colstats.git
cd Colstats
- Build the binary:
go build -o colstats
- Move the binary to your PATH:
mv colstats /usr/local/bin/
To compute sum or average of a specific column in a CSV file:
colstats -op sum -col 1 data.csv
Process multiple files concurrently to improve performance:
colstats -op sum -col 1 -c file1.csv file2.csv file3.csv
For a complete list of options and usage instructions:
colstats --help
colstats -op sum -col 1 example.csv
Output:
Sum of Column 1: 100
colstats -op avg -col 2 -d '\t' example.tsv
Output:
Average of Column 2: 25.5
colstats -op sum -col 1 file1.csv file2.csv file3.csv
Output:
2.47427856e+08
To run the test suite:
go test ./...
To benchmark the tool:
go test -bench=.
To profile the tool for performance analysis:
go test -cpuprofile=cpu.prof -memprofile=mem.prof
Contributions are welcome! For bug reports, feature requests, or other questions, please open an issue on GitHub. To contribute code, submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is inspired by the book "Powerful Command-Line Applications in Go" by Ricardo Gerardi. Special thanks to the Go community for their contributions and support.
This version of the README incorporates emojis to give it a more vibrant and engaging character.