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