mirror of
https://github.com/nushell/nushell.git
synced 2024-11-29 20:03:54 +01:00
25 lines
490 B
Markdown
25 lines
490 B
Markdown
---
|
|
title: dfr pivot
|
|
layout: command
|
|
version: 0.59.1
|
|
---
|
|
|
|
Performs a pivot operation on a groupby object
|
|
|
|
## Signature
|
|
|
|
```> dfr pivot (pivot_column) (value_column) (operation)```
|
|
|
|
## Parameters
|
|
|
|
- `pivot_column`: pivot column to perform pivot
|
|
- `value_column`: value column to perform pivot
|
|
- `operation`: aggregate operation
|
|
|
|
## Examples
|
|
|
|
Pivot a dataframe on b and aggregation on col c
|
|
```shell
|
|
> [[a b c]; [one x 1] [two y 2]] | dfr to-df | dfr group-by a | dfr pivot b c sum
|
|
```
|