Home Explore Blog CI



nushell

commands/docs/drop_column.md
f8f88fddcf51cff80a91931f01a7785d2c48e77de21400e80000000300000593
---
title: drop column
categories: |
  filters
version: 0.104.0
filters: |
  Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`.
usage: |
  Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `drop column` for [filters](/commands/categories/filters.md)

<div class='command-title'>Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`.</div>

## Signature

```> drop column {flags} (columns)```

## Parameters

 -  `columns`: Starting from the end, the number of columns to remove.


## Input/output types:

| input  | output |
| ------ | ------ |
| record | record |
| table  | table  |
## Examples

Remove the last column of a table
```nu
> [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column
╭───┬─────────╮
│ # │   lib   │
├───┼─────────┤
│ 0 │ nu-lib  │
│ 1 │ nu-core │
╰───┴─────────╯

```

Remove the last column of a record
```nu
> {lib: nu-lib, extension: rs} | drop column
╭─────┬────────╮
│ lib │ nu-lib │
╰─────┴────────╯
```

Chunks
b8bf9503 (1st chunk of `commands/docs/drop_column.md`)
Title: drop column
Summary
The `drop column` command removes a specified number of columns from the right-hand end of a table or record. It takes the number of columns to remove as input. For removing columns by name, the `reject` command should be used instead.