MCPcopy
hub / github.com/dask/dask / __repr__

Method __repr__

dask/dataframe/dask_expr/_collection.py:436–453  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

434 return type(self).__name__, self._expr._name
435
436 def __repr__(self):
437 data = self._repr_data().to_string(max_rows=5)
438 _str_fmt = """Dask {klass} Structure:
439{data}
440Dask Name: {name}, {n_expr}
441Expr={expr}"""
442 if not isinstance(self, Series) and not len(self.columns):
443 data = data.partition("\n")[-1].replace("Index", "Divisions")
444 _str_fmt = f"Empty {_str_fmt}"
445 n_expr = len({e._name for e in self.expr.walk()})
446
447 return _str_fmt.format(
448 klass=self.__class__.__name__,
449 data=data,
450 name=key_split(self._name),
451 n_expr=maybe_pluralize(n_expr, "expression"),
452 expr=self.expr,
453 )
454
455 def __bool__(self):
456 raise ValueError(

Callers

nothing calls this directly

Calls 6

_repr_dataMethod · 0.95
key_splitFunction · 0.90
maybe_pluralizeFunction · 0.90
to_stringMethod · 0.45
replaceMethod · 0.45
walkMethod · 0.45

Tested by

no test coverage detected