mirror of
https://github.com/nushell/nushell
synced 2024-12-29 06:23:11 +00:00
c0a1d18e3d
* feat: update #4455, regenerate commands' docs * chore: update make_docs script
31 lines
553 B
Markdown
31 lines
553 B
Markdown
---
|
|
title: dfr take
|
|
layout: command
|
|
version: 0.59.0
|
|
---
|
|
|
|
Creates new dataframe using the given indices
|
|
|
|
## Signature
|
|
|
|
```> dfr take (indices)```
|
|
|
|
## Parameters
|
|
|
|
- `indices`: list of indices used to take data
|
|
|
|
## Examples
|
|
|
|
Takes selected rows from dataframe
|
|
```shell
|
|
> let df = ([[a b]; [4 1] [5 2] [4 3]] | dfr to-df);
|
|
let indices = ([0 2] | dfr to-df);
|
|
$df | dfr take $indices
|
|
```
|
|
|
|
Takes selected rows from series
|
|
```shell
|
|
> let series = ([4 1 5 2 4 3] | dfr to-df);
|
|
let indices = ([0 2] | dfr to-df);
|
|
$series | dfr take $indices
|
|
```
|