File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1015,8 +1015,8 @@ def _check_dataframe_all_leaves(df):
1015
1015
null_indices = np .nonzero (null_mask .any (axis = 1 ).values )[0 ]
1016
1016
for null_row_index in null_indices :
1017
1017
row = null_mask .iloc [null_row_index ]
1018
- indices = np .nonzero (row .values )[0 ]
1019
- if not row [indices [ 0 ] :].all ():
1018
+ i = np .nonzero (row .values )[ 0 ] [0 ]
1019
+ if not row [i :].all ():
1020
1020
raise ValueError (
1021
1021
"None entries cannot have not-None children" ,
1022
1022
df_sorted .iloc [null_row_index ],
@@ -1058,6 +1058,7 @@ def process_dataframe_hierarchy(args):
1058
1058
path = [new_col_name if x == col_name else x for x in path ]
1059
1059
df [new_col_name ] = series_to_copy
1060
1060
# ------------ Define aggregation functions --------------------------------
1061
+
1061
1062
def aggfunc_discrete (x ):
1062
1063
uniques = x .unique ()
1063
1064
if len (uniques ) == 1 :
You can’t perform that action at this time.
0 commit comments