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

Class ToFrame

dask/dataframe/dask_expr/_expr.py:1749–1765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1747
1748
1749class ToFrame(Elemwise):
1750 _parameters = ["frame", "name"]
1751 _defaults = {"name": no_default}
1752 _keyword_only = ["name"]
1753 operation = M.to_frame
1754 _filter_passthrough = True
1755
1756 @functools.cached_property
1757 def unique_partition_mapping_columns_from_shuffle(self):
1758 result = set()
1759 name_mapping = dict(zip(self.frame.columns, self.columns))
1760 for elem in self.frame.unique_partition_mapping_columns_from_shuffle:
1761 if isinstance(elem, tuple):
1762 result.add(tuple(name_mapping.get(v, v) for v in elem))
1763 else:
1764 result.add(name_mapping.get(elem, elem))
1765 return result
1766
1767
1768class ToFrameIndex(ToFrame):

Callers 4

_lowerMethod · 0.90
_lowerMethod · 0.90
_lowerMethod · 0.90
_simplify_upMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected