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

Method _divisions

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

Source from the content-addressed store, hash-verified

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