2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: drop
|
|
|
|
layout: command
|
2022-03-04 12:10:09 +00:00
|
|
|
version: 0.59.1
|
2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
|
2021-05-30 00:57:04 +00:00
|
|
|
Remove the last number of rows or columns.
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> drop (rows)```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `rows`: starting from the back, the number of rows to remove
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Examples
|
2022-02-14 02:22:51 +00:00
|
|
|
|
|
|
|
Remove the last item of a list/table
|
|
|
|
```shell
|
|
|
|
> [0,1,2,3] | drop
|
|
|
|
```
|
|
|
|
|
|
|
|
Remove zero item of a list/table
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> [0,1,2,3] | drop 0
|
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Remove the last two items of a list/table
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> [0,1,2,3] | drop 2
|
|
|
|
```
|