MCPcopy Create free account
hub / github.com/dask/dask / drop

Method drop

dask/dataframe/dask_expr/_collection.py:3340–3352  ·  view source on GitHub ↗
(self, labels=None, axis=0, columns=None, errors="raise")

Source from the content-addressed store, hash-verified

3338
3339 @derived_from(pd.DataFrame)
3340 def drop(self, labels=None, axis=0, columns=None, errors="raise"):
3341 if columns is None and labels is None:
3342 raise TypeError("must either specify 'columns' or 'labels'")
3343
3344 axis = _validate_axis(axis)
3345
3346 if axis == 1:
3347 columns = labels or columns
3348 elif axis == 0 and columns is None:
3349 raise NotImplementedError(
3350 "Drop currently only works for axis=1 or when columns is not None"
3351 )
3352 return new_collection(expr.Drop(self, columns=columns, errors=errors))
3353
3354 def to_parquet(self, path, **kwargs):
3355 from dask.dataframe.dask_expr.io.parquet import to_parquet

Callers 15

test_drop_axis_1Function · 0.95
test_drop_columnsFunction · 0.95
test_with_boundaryFunction · 0.95
drop_overlapFunction · 0.80
drop_columnsFunction · 0.80

Calls 2

_validate_axisFunction · 0.90
new_collectionFunction · 0.90