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

Method _meta

dask/dataframe/dask_expr/_expr.py:2200–2209  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2198
2199 @functools.cached_property
2200 def _meta(self):
2201 if is_dataframe_like(self.frame._meta):
2202 return super()._meta
2203 # if we are not a DataFrame and have a scalar, we reduce to a scalar
2204 if not isinstance(self.operand("columns"), (list, slice)) and not hasattr(
2205 self.operand("columns"), "dtype"
2206 ):
2207 return meta_nonempty(self.frame._meta).iloc[0]
2208 # Avoid column selection for Series/Index
2209 return self.frame._meta
2210
2211 def _node_label_args(self):
2212 return [self.frame, self.operand("columns")]

Callers

nothing calls this directly

Calls 2

is_dataframe_likeFunction · 0.85
operandMethod · 0.80

Tested by

no test coverage detected