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

Method _divisions

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

Source from the content-addressed store, hash-verified

1875 return {}
1876
1877 def _divisions(self):
1878 if not self.is_monotonic:
1879 # Implement this consistently with dask.dataframe, e.g. add option to
1880 # control monotonic map func
1881 return (None,) * len(self.frame.divisions)
1882 elif is_index_like(self.frame._meta):
1883 return tuple(
1884 pd.Series(self.frame.divisions).map(self.arg, na_action=self.na_action)
1885 )
1886 elif isinstance(self.arg, Expr):
1887 if self.arg.divisions == self.frame.divisions:
1888 return self.frame.divisions
1889 else:
1890 # We only get here when we have only one partition
1891 return (None,) * (self.frame.npartitions + 1)
1892 return super()._divisions()
1893
1894
1895class VarColumns(Elemwise):

Callers 6

_divisionsMethod · 0.45
_divisionsMethod · 0.45
_divisionsMethod · 0.45
_divisionsMethod · 0.45
_lowerMethod · 0.45
_divisionsMethod · 0.45

Calls 2

is_index_likeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected