Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _recombine_columns when either geocolumn or non-geocolumn was empty #1438

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

mroeschke
Copy link
Contributor

Description

closes #1437

When GeoDataFrame._split_out_geometry_columns is called, there may be no geometry columns to split out into 2 DataFrames; therefore, once GeoDataFrame._recombine_columns, it assumed the 2 DataFrames were always non-empty. Added a check to bypass this validation if either was empty.

I ran the ZipCodes_Stops_PiP_cuSpatial notebook locally and the (non-commented) cells no longer raise an exception.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke requested a review from a team as a code owner August 13, 2024 00:25
@github-actions github-actions bot added the Python Related to Python code label Aug 13, 2024
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a logic simplification.

python/cuspatial/cuspatial/core/geodataframe.py Outdated Show resolved Hide resolved
Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>
@jakirkham jakirkham requested a review from harrism August 13, 2024 19:26
@harrism harrism added bug Something isn't working non-breaking Non-breaking change labels Aug 13, 2024
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jameslamb
Copy link
Member

I'm interested in getting this merged to unblock CI here, so I pushed the pre-commit changes CI was complaining about (just those automatically applied by pre-commit run --all-files). Figured you wouldn't mind, @mroeschke .

@jameslamb
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit 314dc7d into rapidsai:branch-24.10 Aug 13, 2024
57 checks passed
@mroeschke mroeschke deleted the fix/recombine/empty branch August 13, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Related to Python code
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

[BUG]: ZipCodes_Stops_PiP_cuSpatial failing: "geo_columns.index must equal data_columns.index"
3 participants