Skip to content

Commit be2cdba

Browse files
committed
rename stat to stats and stat2 to stats2
1 parent aa39c31 commit be2cdba

File tree

5 files changed

+32
-26
lines changed

5 files changed

+32
-26
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## Introduction
1717

18-
Similar to FASTA/Q format in field of Bioinformatics,
18+
Similar to FASTA/Q format in field of Bioinformatics,
1919
CSV/TSV formats are basic and ubiquitous file formats in both Bioinformatics and data sicence.
2020

2121
People usually use spreadsheet softwares like MS Excel to do process table data.
@@ -68,8 +68,8 @@ It could save you much time of writing Python/R scripts.
6868
**Information**
6969

7070
- `headers` print headers
71-
- `stat` summary of CSV file
72-
- `stat2` summary of selected number fields
71+
- `stats` summary of CSV file
72+
- `stats2` summary of selected digital fields
7373

7474
**Format conversion**
7575

@@ -201,7 +201,7 @@ Examples
201201
1 Robert Thompson abc
202202
NA Robert Abel 123
203203

204-
1. Summary of selected number fields: num, sum, min, max, mean, stdev (`stat2`)
204+
1. Summary of selected digital fields: num, sum, min, max, mean, stdev (`stat2`)
205205

206206
$ cat digitals.tsv
207207
4 5 6
@@ -287,7 +287,7 @@ Examples
287287

288288
## Acknowledgements
289289

290-
We are grateful to [Zhiluo Deng](https://github.com/dawnmy) and
290+
We are grateful to [Zhiluo Deng](https://github.com/dawnmy) and
291291
[Li Peng](https://github.com/penglbio) for suggesting features and reporting bugs.
292292

293293
## Contact

csvtk/cmd/stat.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ import (
3232

3333
// statCmd represents the stat command
3434
var statCmd = &cobra.Command{
35-
Use: "stat",
36-
Short: "summary of CSV file",
35+
Use: "stats",
36+
Aliases: []string{"stat"},
37+
Short: "summary of CSV file",
3738
Long: `summary of CSV file
3839
3940
`,

csvtk/cmd/stat2.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ import (
3838

3939
// stat2Cmd represents the stat2 command
4040
var stat2Cmd = &cobra.Command{
41-
Use: "stat2",
42-
Short: "summary of selected number fields",
43-
Long: `summary of selected number fields: num, sum, min, max, mean, stdev
41+
Use: "stats2",
42+
Aliases: []string{"stats2"},
43+
Short: "summary of selected digital fields",
44+
Long: `summary of selected digital fields: num, sum, min, max, mean, stdev
4445
4546
`,
4647
Run: func(cmd *cobra.Command, args []string) {

doc/docs/download.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/csvtk/v0.7.0/total.svg)](https://github.com/shenwei356/csvtk/releases/tag/v0.7.0)
1111

1212
- fig bug of "stricter field checking" in v0.6.0 and v0.6.1 when using flag `-F/--fuzzy-fields`
13+
- `csvtk pretty` and `csvtk csv2md`: add attention that
14+
these commands treat the first row as header line and require them to be unique.
15+
- `csvtk stat` renamed to `csvtk stats`, old name is still available as an alias.
16+
- `csvtk stat2` renamed to `csvtk stats2`, old name is still available as an alias.
1317
- [issues/13](https://github.com/shenwei356/csvtk/issues/13) **seamlessly support data with meta line of separator declaration used by MS Excel**, e.g.,
1418

1519
$ cat names_with_meta.csv
@@ -25,9 +29,6 @@
2529
11,Rob,Pike,rob
2630
4,Robert,Griesemer,gri
2731

28-
- `csvtk pretty` and `csvtk csv2md`: add attention that
29-
these commands treat the first row as header line and require them to be unique.
30-
3132

3233
Links:
3334

doc/docs/usage.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
**Information**
2323

2424
- [headers](#headers)
25-
- [stat](#stat)
26-
- [stat2](#stat2)
25+
- [stats](#stats)
26+
- [stats2](#stats2)
2727

2828
**Format conversion**
2929

@@ -71,7 +71,7 @@ Usage
7171
```
7272
A cross-platform, efficient and practical CSV/TSV toolkit
7373
74-
Version: 0.6.0
74+
Version: 0.7.0-dev2
7575
7676
Author: Wei Shen <[email protected]>
7777
@@ -114,8 +114,8 @@ Available Commands:
114114
sample sampling by proportion
115115
sort sort by selected fields
116116
space2tab convert space delimited format to CSV
117-
stat summary of CSV file
118-
stat2 summary of selected number fields
117+
stats summary of CSV file
118+
stats2 summary of selected number fields
119119
tab2csv convert tabular format to CSV
120120
transpose transpose CSV data
121121
uniq unique data without sorting
@@ -163,15 +163,18 @@ $ csvtk headers testdata/*.csv$
163163
3 hobby
164164
```
165165

166-
## stat
166+
## stats
167167

168168
Usage
169169

170170
```
171171
summary of CSV file
172172
173173
Usage:
174-
csvtk stat [flags]
174+
csvtk stats [flags]
175+
176+
Aliases:
177+
stats, stat
175178
176179
```
177180

@@ -187,7 +190,7 @@ Examples
187190
1,"Robert","Thompson","abc"
188191
NA,"Robert","Abel","123"
189192

190-
$ cat testdata/names.csv | csvtk stat
193+
$ cat testdata/names.csv | csvtk stats
191194
file num_cols num_rows
192195
- 4 5
193196

@@ -199,7 +202,7 @@ Examples
199202
7 8 0
200203
8 1,000 4
201204

202-
$ cat testdata/digitals.tsv | csvtk stat -t -H
205+
$ cat testdata/digitals.tsv | csvtk stats -t -H
203206
file num_cols num_rows
204207
- 3 4
205208

@@ -208,10 +211,10 @@ Examples
208211
Usage
209212

210213
```
211-
summary of selected number fields: num, sum, min, max, mean, stdev
214+
summary of selected digital fields: num, sum, min, max, mean, stdev
212215
213216
Usage:
214-
csvtk stat2 [flags]
217+
csvtk stats2 [flags]
215218
216219
Flags:
217220
-f, --fields string select only these fields. e.g -f 1,2 or -f columnA,columnB
@@ -223,7 +226,7 @@ Examples
223226

224227
1. simplest one
225228

226-
$ seq 1 5 | csvtk stat2 -H -f 1
229+
$ seq 1 5 | csvtk stats2 -H -f 1
227230
field num sum min max mean stdev
228231
1 5 15 1 5 3 1.58
229232

@@ -235,7 +238,7 @@ Examples
235238
7 8 0
236239
8 1,000 4
237240

238-
$ cat testdata/digitals.tsv | csvtk stat2 -t -H -f 1-3
241+
$ cat testdata/digitals.tsv | csvtk stats2 -t -H -f 1-3
239242
field num sum min max mean stdev
240243
1 4 20 1 8 5 3.16
241244
2 4 1,015 2 1,000 253.75 497.51

0 commit comments

Comments
 (0)