https://github.com/alidevhere/csv-column-extractor
Extracts columns from one file and copies into other file in defined order.
https://github.com/alidevhere/csv-column-extractor
csv csv-parser extractor go-csv go-package golang golang-library
Last synced: about 2 months ago
JSON representation
Extracts columns from one file and copies into other file in defined order.
- Host: GitHub
- URL: https://github.com/alidevhere/csv-column-extractor
- Owner: alidevhere
- Created: 2023-02-22T10:36:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-02T21:59:03.000Z (about 1 year ago)
- Last Synced: 2025-02-02T22:26:50.448Z (about 1 year ago)
- Topics: csv, csv-parser, extractor, go-csv, go-package, golang, golang-library
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSV Column Extractor
Extracts columns from one file and copies into other file in defined order.
## Download package
```
go get github.com/alidevhere/csv-column-extractor
```
# Example:
In this example column number 0 and 2 are copied into a new file, columns are copied into new file in defined order i.e 0 and 2 in this case.
```
err := CopyCSVColumns("src.csv", "dst.csv",ExtractorOptions{SkipHeader: true, Columns: []int{0, 2}})
if err != nil {
fmt.Println(err)
}
```