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

Function test_unknown_divisions_error

dask/dataframe/tseries/tests/test_resample.py:177–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176
177def test_unknown_divisions_error():
178 df = pd.DataFrame({"x": [1, 2, 3]})
179 ddf = dd.from_pandas(df, npartitions=2, sort=False).clear_divisions()
180 try:
181 ddf.x.resample("1m").mean()
182 assert False
183 except ValueError as e:
184 assert "divisions" in str(e)
185
186
187def test_resample_index_name():

Callers

nothing calls this directly

Calls 3

resampleMethod · 0.80
clear_divisionsMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected