@@ -2445,7 +2445,7 @@ def make_partition(i):
2445
2445
return pd .DataFrame ({"a" : np .random .random (10 ), "b" : np .random .random (10 )})
2446
2446
2447
2447
with dask .config .set ({"dataframe.convert-string" : False }):
2448
- ddf = dd .from_map (make_partition , range (5 ))
2448
+ ddf = dd .from_map (make_partition , range (5 ), meta = { "a" : float , "b" : float } )
2449
2449
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2450
2450
out = ddf .shuffle (on = "a" , ignore_index = True )
2451
2451
result , expected = c .compute ([ddf , out ])
@@ -2498,7 +2498,7 @@ def make_partition(i):
2498
2498
)
2499
2499
return pd .DataFrame ({"a" : np .random .random (10 ), "b" : np .random .random (10 )})
2500
2500
2501
- ddf = dd .from_map (make_partition , range (50 ))
2501
+ ddf = dd .from_map (make_partition , range (50 ), meta = { "a" : float , "b" : float } )
2502
2502
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2503
2503
out = ddf .shuffle (on = "a" , ignore_index = True )
2504
2504
@@ -2522,7 +2522,7 @@ def make_partition(i):
2522
2522
return pd .DataFrame ({"a" : np .random .random (10 ), "b" : ["a" ] * 10 })
2523
2523
return pd .DataFrame ({"a" : np .random .random (10 ), "b" : np .random .random (10 )})
2524
2524
2525
- ddf = dd .from_map (make_partition , range (50 ))
2525
+ ddf = dd .from_map (make_partition , range (50 ), meta = { "a" : float , "b" : float } )
2526
2526
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2527
2527
out = ddf .shuffle (on = "a" , ignore_index = True )
2528
2528
@@ -2829,7 +2829,9 @@ def make_partition(partition_id, size):
2829
2829
df ["b" ] = df ["a" ] % 23
2830
2830
return df
2831
2831
2832
- df = dd .from_map (make_partition , np .arange (19 ), args = (250 ,))
2832
+ df = dd .from_map (
2833
+ make_partition , np .arange (19 ), args = (250 ,), meta = {"a" : int , "b" : int }
2834
+ )
2833
2835
2834
2836
with dask .config .set (
2835
2837
{"dataframe.shuffle.method" : "p2p" , "distributed.p2p.storage.disk" : disk }
0 commit comments