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

Class ToFrame

dask/dataframe/dask_expr/_expr.py:1753–1769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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