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

Class ToFrame

dask/dataframe/dask_expr/_expr.py:1752–1768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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