Skip to content

Fix command overlapping for make_docs.nu and Refresh commands for v0.64 #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 16 additions & 16 deletions book/commands/dfr_agg.md → book/commands/_agg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr agg
version: 0.63.1
title: agg
version: 0.64.0
usage: |
Performs a series of aggregations from a group by
---
Expand All @@ -16,7 +16,7 @@ usage: |

## Signature

```> dfr agg ...Group by expressions```
```> agg ...Group by expressions```

## Parameters

Expand All @@ -27,24 +27,24 @@ usage: |
Group by and perform an aggregation
```shell
> [[a b]; [1 2] [1 4] [2 6] [2 4]]
| dfr to-df
| dfr group-by a
| dfr agg [
("b" | dfr min | dfr as "b_min")
("b" | dfr max | dfr as "b_max")
("b" | dfr sum | dfr as "b_sum")
| to-df
| group-by a
| agg [
(col b | min | as "b_min")
(col b | max | as "b_max")
(col b | sum | as "b_sum")
]
```

Group by and perform an aggregation
```shell
> [[a b]; [1 2] [1 4] [2 6] [2 4]]
| dfr to-lazy
| dfr group-by a
| dfr agg [
("b" | dfr min | dfr as "b_min")
("b" | dfr max | dfr as "b_max")
("b" | dfr sum | dfr as "b_sum")
| to-lazy
| group-by a
| agg [
(col b | min | as "b_min")
(col b | max | as "b_max")
(col b | sum | as "b_sum")
]
| dfr collect
| collect
```
12 changes: 6 additions & 6 deletions book/commands/dfr_all-false.md → book/commands/_all-false.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr all-false
version: 0.63.0
title: all-false
version: 0.64.0
usage: |
Returns true if all values are false
---
Expand All @@ -16,18 +16,18 @@ usage: |

## Signature

```> dfr all-false ```
```> all-false ```

## Examples

Returns true if all values are false
```shell
> [false false false] | dfr to-df | dfr all-false
> [false false false] | to-df | all-false
```

Checks the result from a comparison
```shell
> let s = ([5 6 2 10] | dfr to-df);
> let s = ([5 6 2 10] | to-df);
let res = ($s > 9);
$res | dfr all-false
$res | all-false
```
12 changes: 6 additions & 6 deletions book/commands/dfr_all-true.md → book/commands/_all-true.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr all-true
version: 0.63.0
title: all-true
version: 0.64.0
usage: |
Returns true if all values are true
---
Expand All @@ -16,18 +16,18 @@ usage: |

## Signature

```> dfr all-true ```
```> all-true ```

## Examples

Returns true if all values are true
```shell
> [true true true] | dfr to-df | dfr all-true
> [true true true] | to-df | all-true
```

Checks the result from a comparison
```shell
> let s = ([5 6 2 8] | dfr to-df);
> let s = ([5 6 2 8] | to-df);
let res = ($s > 9);
$res | dfr all-true
$res | all-true
```
14 changes: 7 additions & 7 deletions book/commands/dfr_append.md → book/commands/_append.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr append
version: 0.63.0
title: append
version: 0.64.0
usage: |
Appends a new dataframe
---
Expand All @@ -16,7 +16,7 @@ usage: |

## Signature

```> dfr append (other) --col```
```> append (other) --col```

## Parameters

Expand All @@ -27,12 +27,12 @@ usage: |

Appends a dataframe as new columns
```shell
> let a = ([[a b]; [1 2] [3 4]] | dfr to-df);
$a | dfr append $a
> let a = ([[a b]; [1 2] [3 4]] | to-df);
$a | append $a
```

Appends a dataframe merging at the end of columns
```shell
> let a = ([[a b]; [1 2] [3 4]] | dfr to-df);
$a | dfr append $a --col
> let a = ([[a b]; [1 2] [3 4]] | to-df);
$a | append $a --col
```
8 changes: 4 additions & 4 deletions book/commands/dfr_arg-max.md → book/commands/_arg-max.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr arg-max
version: 0.63.0
title: arg-max
version: 0.64.0
usage: |
Return index for max value in series
---
Expand All @@ -16,11 +16,11 @@ usage: |

## Signature

```> dfr arg-max ```
```> arg-max ```

## Examples

Returns index for max value
```shell
> [1 3 2] | dfr to-df | dfr arg-max
> [1 3 2] | to-df | arg-max
```
8 changes: 4 additions & 4 deletions book/commands/dfr_arg-min.md → book/commands/_arg-min.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr arg-min
version: 0.63.0
title: arg-min
version: 0.64.0
usage: |
Return index for min value in series
---
Expand All @@ -16,11 +16,11 @@ usage: |

## Signature

```> dfr arg-min ```
```> arg-min ```

## Examples

Returns index for min value
```shell
> [1 3 2] | dfr to-df | dfr arg-min
> [1 3 2] | to-df | arg-min
```
10 changes: 5 additions & 5 deletions book/commands/dfr_arg-sort.md → book/commands/_arg-sort.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr arg-sort
version: 0.63.0
title: arg-sort
version: 0.64.0
usage: |
Returns indexes for a sorted series
---
Expand All @@ -16,7 +16,7 @@ usage: |

## Signature

```> dfr arg-sort --reverse --nulls-last```
```> arg-sort --reverse --nulls-last```

## Parameters

Expand All @@ -27,10 +27,10 @@ usage: |

Returns indexes for a sorted series
```shell
> [1 2 2 3 3] | dfr to-df | dfr arg-sort
> [1 2 2 3 3] | to-df | arg-sort
```

Returns indexes for a sorted series
```shell
> [1 2 2 3 3] | dfr to-df | dfr arg-sort -r
> [1 2 2 3 3] | to-df | arg-sort -r
```
8 changes: 4 additions & 4 deletions book/commands/dfr_arg-true.md → book/commands/_arg-true.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr arg-true
version: 0.63.0
title: arg-true
version: 0.64.0
usage: |
Returns indexes where values are true
---
Expand All @@ -16,11 +16,11 @@ usage: |

## Signature

```> dfr arg-true ```
```> arg-true ```

## Examples

Returns indexes where values are true
```shell
> [false true false] | dfr to-df | dfr arg-true
> [false true false] | to-df | arg-true
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr arg-unique
version: 0.63.0
title: arg-unique
version: 0.64.0
usage: |
Returns indexes for unique values
---
Expand All @@ -16,11 +16,11 @@ usage: |

## Signature

```> dfr arg-unique ```
```> arg-unique ```

## Examples

Returns indexes for unique values
```shell
> [1 2 2 3 3] | dfr to-df | dfr arg-unique
> [1 2 2 3 3] | to-df | arg-unique
```
8 changes: 4 additions & 4 deletions book/commands/dfr_as-date.md → book/commands/_as-date.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr as-date
version: 0.63.0
title: as-date
version: 0.64.0
usage: |
Converts string to date.
---
Expand All @@ -16,7 +16,7 @@ usage: |

## Signature

```> dfr as-date (format) --not-exact```
```> as-date (format) --not-exact```

## Parameters

Expand All @@ -34,5 +34,5 @@ Format example:

Converts string to date
```shell
> ["2021-12-30" "2021-12-31"] | dfr to-df | dfr as-datetime "%Y-%m-%d"
> ["2021-12-30" "2021-12-31"] | to-df | as-datetime "%Y-%m-%d"
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr as-datetime
version: 0.63.0
title: as-datetime
version: 0.64.0
usage: |
Converts string to datetime.
---
Expand All @@ -16,7 +16,7 @@ usage: |

## Signature

```> dfr as-datetime (format) --not-exact```
```> as-datetime (format) --not-exact```

## Parameters

Expand All @@ -42,5 +42,5 @@ Format example:

Converts string to datetime
```shell
> ["2021-12-30 00:00:00" "2021-12-31 00:00:00"] | dfr to-df | dfr as-datetime "%Y-%m-%d %H:%M:%S"
> ["2021-12-30 00:00:00" "2021-12-31 00:00:00"] | to-df | as-datetime "%Y-%m-%d %H:%M:%S"
```
10 changes: 5 additions & 5 deletions book/commands/dfr_cache.md → book/commands/_cache.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: dfr cache
version: 0.63.0
title: cache
version: 0.64.0
usage: |
Caches operations in a new LazyFrame
---
Expand All @@ -16,11 +16,11 @@ usage: |

## Signature

```> dfr cache ```
```> cache ```

## Examples


Caches the result into a new LazyFrame
```shell
>
> [[a b]; [6 2] [4 2] [2 2]] | to-df | reverse | cache
```
26 changes: 26 additions & 0 deletions book/commands/_collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: collect
version: 0.64.0
usage: |
Collect lazy dataframe into eager dataframe
---

<script>
import { usePageFrontmatter } from '@vuepress/client';
export default { computed: { frontmatter() { return usePageFrontmatter().value; } } }
</script>

# <code>{{ frontmatter.title }}</code>

<div style='white-space: pre-wrap;'>{{ frontmatter.usage }}</div>

## Signature

```> collect ```

## Examples

drop duplicates
```shell
> [[a b]; [1 2] [3 4]] | to-lazy | collect
```
Loading