tabsdata.tableframe.lazyframe.frame.TableFrame.drop#
- TableFrame.drop(*columns: ColumnNameOrSelector | Iterable[ColumnNameOrSelector], strict: bool = True) TableFrame [source]#
Discard columns from the TableFrame.
- Parameters:
columns – Columns to drop.
strict – If True, raises an error if a column does not exist.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> ┌──────┬──────┐ │ x ┆ y │ │ --- ┆ --- │ │ f64 ┆ f64 │ ╞══════╪══════╡ │ 1.0 ┆ 2.0 │ │ 2.0 ┆ 2.0 │ │ 10.0 ┆ 10.0 │ │ 4.0 ┆ 10.0 │ │ 5.0 ┆ null │ │ null ┆ null │ └──────┴──────┘ >>> >>> tf.drop("y") >>> ┌──────┐ │ x │ │ --- │ │ f64 │ ╞══════╡ │ 1.0 │ │ 2.0 │ │ NaN │ │ 4.0 │ │ 5.0 │ │ null │ └──────┘