daft.DataFrame.exclude#
- DataFrame.exclude(*names: str) DataFrame [source]#
Drops columns from the current DataFrame by name
This is equivalent of performing a select with all the columns but the ones excluded.
Example
>>> import daft >>> df = daft.from_pydict({"x": [1, 2, 3], "y": [4, 5, 6], "z": [7, 8, 9]}) >>> df_without_x = df.exclude('x') >>> df_without_x.show() ╭───────┬───────╮ │ y ┆ z │ │ --- ┆ --- │ │ Int64 ┆ Int64 │ ╞═══════╪═══════╡ │ 4 ┆ 7 │ ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤ │ 5 ┆ 8 │ ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤ │ 6 ┆ 9 │ ╰───────┴───────╯ (Showing first 3 of 3 rows)
- Parameters:
*names (str) – names to exclude
- Returns:
DataFrame with some columns excluded.
- Return type: