mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 04:45:57 +02:00
First pass at updating all documentation formatting and cleaning up output of examples (#2031)
This commit is contained in:
@@ -6,7 +6,7 @@ Returns unique rows or values from a dataset.
|
||||
|
||||
Given a file `test.csv`
|
||||
|
||||
```
|
||||
```csv
|
||||
first_name,last_name,rusty_at,type
|
||||
Andrés,Robalino,10/11/2013,A
|
||||
Andrés,Robalino,10/11/2013,A
|
||||
@@ -14,7 +14,7 @@ Jonathan,Turner,10/12/2013,B
|
||||
Yehuda,Katz,10/11/2013,A
|
||||
```
|
||||
|
||||
```
|
||||
```shell
|
||||
> `open test.csv | uniq`
|
||||
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━
|
||||
# │ first_name │ last_name │ rusty_at │ type
|
||||
@@ -25,10 +25,10 @@ Yehuda,Katz,10/11/2013,A
|
||||
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━
|
||||
```
|
||||
|
||||
```
|
||||
```shell
|
||||
> `open test.csv | get type | uniq`
|
||||
━━━┯━━━━━━━━━
|
||||
# │ <value>
|
||||
# │
|
||||
───┼─────────
|
||||
0 │ A
|
||||
1 │ B
|
||||
@@ -36,14 +36,15 @@ Yehuda,Katz,10/11/2013,A
|
||||
```
|
||||
|
||||
### Counting
|
||||
|
||||
`--count` or `-c` is the flag to output a `count` column.
|
||||
|
||||
```
|
||||
```shell
|
||||
> `open test.csv | get type | uniq -c`
|
||||
───┬───────┬───────
|
||||
# │ value │ count
|
||||
# │ value │ count
|
||||
───┼───────┼───────
|
||||
0 │ A │ 3
|
||||
1 │ B │ 2
|
||||
0 │ A │ 3
|
||||
1 │ B │ 2
|
||||
───┴───────┴───────
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user