Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beenotung/csv-transpose
Transpose (rotate) data from rows to columns or vice verse in csv/tsv
https://github.com/beenotung/csv-transpose
cli csv transpose tsv
Last synced: 25 days ago
JSON representation
Transpose (rotate) data from rows to columns or vice verse in csv/tsv
- Host: GitHub
- URL: https://github.com/beenotung/csv-transpose
- Owner: beenotung
- License: bsd-2-clause
- Created: 2018-11-02T06:19:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-27T18:43:37.000Z (over 2 years ago)
- Last Synced: 2024-12-23T17:06:19.797Z (about 1 month ago)
- Topics: cli, csv, transpose, tsv
- Language: TypeScript
- Homepage:
- Size: 13.7 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csv-transpose
[![npm Package Version](https://img.shields.io/npm/v/csv-transpose.svg)](https://www.npmjs.com/package/csv-transpose)Transpose (rotate) data from rows to columns or vice verse in csv/tsv
## Installation
```bash
# for cli
npm i -g csv-transpose# for import usage
npm i csv-transpose
```Executables:
- `csv-transpose`
- `tsv-transpose`## Examples
### View Help Messages
```bash
csv-transpose --help
```### Using files
```bash
csv-transpose -i in.csv -o out.csv
```### Using pipe
```bash
cat in.csv | csv-transpose > out.csv
```### Calling from node.js
```javascript
let lib = require('csv-transpose')
let text = '...some csv text...'
let separator = ','
text = lib.transpose(text, separator)
```### Calling from typescript
```typescript
import { transpose } from 'csv-transpose'
let text = '...some csv text...'
let separator = ','
text = lib.transpose(text, separator)
```The file mode and pipe mode can be used in combination.
## License
This project is licensed with [BSD-2-Clause](./LICENSE)
This is free, libre, and open-source software. It comes down to four essential freedoms [[ref]](https://seirdy.one/2021/01/27/whatsapp-and-the-domestication-of-users.html#fnref:2):
- The freedom to run the program as you wish, for any purpose
- The freedom to study how the program works, and change it so it does your computing as you wish
- The freedom to redistribute copies so you can help others
- The freedom to distribute copies of your modified versions to others