File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -532,7 +532,9 @@ def _mul_cols(df, cols):
532532 # Fix index in a groupby().apply() context
533533 # https://github.com/dask/dask/issues/8137
534534 # https://github.com/pandas-dev/pandas/issues/43568
535- _df .index = [0 ] * len (_df )
535+ # Make sure index dtype is int (even if _df is empty)
536+ # https://github.com/dask/dask/pull/9701
537+ _df .index = np .zeros (len (_df ), dtype = int )
536538 return _df
537539
538540
@@ -641,8 +643,10 @@ def _drop_duplicates_reindex(df):
641643 # Fix index in a groupby().apply() context
642644 # https://github.com/dask/dask/issues/8137
643645 # https://github.com/pandas-dev/pandas/issues/43568
646+ # Make sure index dtype is int (even if result is empty)
647+ # https://github.com/dask/dask/pull/9701
644648 result = df .drop_duplicates ()
645- result .index = [ 0 ] * len (result )
649+ result .index = np . zeros ( len (result ), dtype = int )
646650 return result
647651
648652
You can’t perform that action at this time.
0 commit comments