()
| 5367 | |
| 5368 | |
| 5369 | def test_dataframe_into_delayed(): |
| 5370 | pdf = pd.DataFrame({"a": [1, 2, 3], "b": 1}) |
| 5371 | df = dd.from_pandas(pdf, npartitions=2) |
| 5372 | |
| 5373 | def test_func(df): |
| 5374 | return df.sum().sum() |
| 5375 | |
| 5376 | def delayed_func(i): |
| 5377 | # sanity check |
| 5378 | assert i.sum() == 6 |
| 5379 | |
| 5380 | df = df[["a"]].map_partitions(test_func, meta=(None, int)) |
| 5381 | result = delayed(delayed_func)(df) |
| 5382 | assert sum(map(len, result.dask.layers.values())) == 6 |
| 5383 | result.compute() |
| 5384 | |
| 5385 | |
| 5386 | def test_array_to_df_conversion(): |
nothing calls this directly
no test coverage detected