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

Method squeeze

dask/dataframe/dask_expr/_collection.py:3319–3332  ·  view source on GitHub ↗
(self, axis=None)

Source from the content-addressed store, hash-verified

3317
3318 @derived_from(pd.DataFrame)
3319 def squeeze(self, axis=None):
3320 if axis in [None, 1]:
3321 if len(self.columns) == 1:
3322 return self[self.columns[0]]
3323 else:
3324 return self
3325
3326 elif axis == 0:
3327 raise NotImplementedError(
3328 f"{type(self)} does not support squeeze along axis 0"
3329 )
3330
3331 else:
3332 raise ValueError(f"No axis {axis} for object type {type(self)}")
3333
3334 @derived_from(pd.DataFrame)
3335 def explode(self, column):

Callers 2

test_squeezeFunction · 0.95
test_squeezeFunction · 0.95

Calls

no outgoing calls

Tested by 2

test_squeezeFunction · 0.76
test_squeezeFunction · 0.76