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

Function check_divisions

dask/dataframe/core.py:257–267  ·  view source on GitHub ↗
(divisions)

Source from the content-addressed store, hash-verified

255
256
257def check_divisions(divisions):
258 if not isinstance(divisions, (list, tuple)):
259 raise ValueError("New division must be list or tuple")
260 divisions = list(divisions)
261 if len(divisions) == 0:
262 raise ValueError("New division must not be empty")
263 if divisions != sorted(divisions):
264 raise ValueError("New division must be sorted")
265 if len(divisions[:-1]) != len(list(unique(divisions[:-1]))):
266 msg = "New division must be unique, except for the last element"
267 raise ValueError(msg)
268
269
270def _map_freq_to_period_start(freq):

Callers 2

repartitionMethod · 0.90
set_indexMethod · 0.90

Calls 1

uniqueFunction · 0.70

Tested by

no test coverage detected