polars.DataFrame.drop_in_place
-
Drop a single column in-place and return the dropped column.
- Parameters:
-
- name
-
Name of the column to drop.
- Returns:
-
- Series
-
The dropped column.
Examples
>>> df = pl.DataFrame( ... { ... "foo": [1, 2, 3], ... "bar": [6, 7, 8], ... "ham": ["a", "b", "c"], ... } ... ) >>> df.drop_in_place("ham") shape: (3,) Series: 'ham' [str] [ "a" "b" "c" ]
DataFrame.drop_in_place(
name: str,
) → Series
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.drop_in_place.html