File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
awswrangler/distributed/ray/modin Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,16 @@ def _validate_partition(df: pd.DataFrame, n_columns: int) -> bool:
31
31
return len (df .columns ) == n_columns
32
32
33
33
# Unwrap partitions as they are currently stored (axis=None)
34
+ # Partitions are a 2D array because the data frame is split along both row and column axis
34
35
partitions : List [List [ray .types .ObjectRef [pd .DataFrame ]]] = unwrap_partitions (df , axis = None )
35
36
return all (
36
- ray .get ([_validate_partition .remote (partition , len (df .columns )) for row in partitions for partition in row ])
37
+ ray .get (
38
+ [
39
+ _validate_partition .remote (partition , len (df .columns ))
40
+ for partitions_row in partitions
41
+ for partition in partitions_row
42
+ ]
43
+ )
37
44
)
38
45
39
46
@@ -74,8 +81,8 @@ def wrapper(
74
81
"The dataframe will be automatically repartitioned along row axis to ensure "
75
82
"each partition can be processed independently."
76
83
)
77
- df = from_partitions ( unwrap_partitions ( df , axis = 0 ), axis = axis , row_lengths = row_lengths )
78
- elif axis is not None :
84
+ axis = 0
85
+ if axis is not None :
79
86
df = from_partitions (unwrap_partitions (df , axis = axis ), axis = axis , row_lengths = row_lengths )
80
87
return function (df , * args , ** kwargs )
81
88
You can’t perform that action at this time.
0 commit comments