E535 Fix IndexError when printing DataFrames with empty partitions by Utkarshkarki · Pull Request #12264 · dask/dask · GitHub
[go: up one dir, main page]

Skip to content

Fix IndexError when printing DataFrames with empty partitions#12264

Open
Utkarshkarki wants to merge 1 commit intodask:mainfrom
Utkarshkarki:fix/12257-print-indexerror
Open

Fix IndexError when printing DataFrames with empty partitions#12264
Utkarshkarki wants to merge 1 commit intodask:mainfrom
Utkarshkarki:fix/12257-print-indexerror

Conversation

@Utkarshkarki
Copy link
@Utkarshkarki Utkarshkarki commented Feb 2, 2026

Fixes #12257

Problem
print(df) crashes with IndexError: index 0 is out of bounds when DataFrame operations produce empty partitions.

Solution
Added guard clause in process_val_weights to handle empty data gracefully. Returns unknown divisions instead of crashing, consistent with Dask's existing behavior.

Changes
Added early-return check for empty vals or
weights
arrays in
dask/dataframe/partitionquantiles.py

@github-actions
Copy link
Contributor
github-actions bot commented Feb 2, 2026

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit e0c1d4b. ± Comparison against base commit 825904a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dask Crashes With Index Out Of Bounds on Print

1 participant

0