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

Function main

dask/tests/test_distributed.py:788–798  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

786 return d
787
788 def main():
789 item_df = dd.from_pandas(pd.DataFrame({"a": range(10)}), npartitions=1)
790 ddf = item_df.to_delayed()[0].persist()
791 merged_df = dd.from_pandas(pd.DataFrame({"b": range(10)}), npartitions=1)
792
793 # Notice, we include a shuffle in order to trigger a complex culling
794 merged_df = merged_df.shuffle(on="b", shuffle_method="tasks")
795
796 merged_df.map_partitions(
797 f, ddf, meta=merged_df, enforce_metadata=False
798 ).compute()
799
800 with distributed.LocalCluster(
801 scheduler_port=0,

Callers 1

Calls 5

persistMethod · 0.45
to_delayedMethod · 0.45
shuffleMethod · 0.45
computeMethod · 0.45
map_partitionsMethod · 0.45

Tested by

no test coverage detected