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 GeoDataframe slicing issue by adding _slice_ method. #680

Merged

Conversation

thomcom
Copy link
Contributor

@thomcom thomcom commented Sep 19, 2022

Description

This PR will adds a _slice method which is called when a cudf.DataFrame is accessed in a variety of ways. It also adds the name member to GeoSeries that are pulled from the GeoDataFrame.

Fixes #676

Checklist

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

@github-actions github-actions bot added the Python Related to Python code label Sep 19, 2022
@thomcom thomcom force-pushed the bug/slice-geodataframe-broken branch from ecfd5ca to 329a08b Compare September 20, 2022 00:18
@thomcom thomcom self-assigned this Sep 20, 2022
@thomcom thomcom added bug Something isn't working 3 - Ready for Review Ready for review by team non-breaking Non-breaking change labels Sep 20, 2022
@thomcom
Copy link
Contributor Author

thomcom commented Sep 20, 2022

rerun tests

@thomcom thomcom marked this pull request as ready for review September 20, 2022 14:51
@thomcom thomcom requested a review from a team as a code owner September 20, 2022 14:51
@thomcom thomcom requested a review from trxcllnt September 20, 2022 14:51
@thomcom thomcom requested a review from isVoid September 21, 2022 01:32
@thomcom thomcom changed the title Fix GeoDataframe slicing issue by refactoring GeoColumn Fix GeoDataframe slicing issue by adding _slice_ method. Sep 21, 2022
Copy link
Contributor

@isVoid isVoid left a comment

Choose a reason for hiding this comment

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

I assume this pattern will come up very often: filter out geocolumn, handle geocolumn, handle data column, combine geocolumn and data column. Can we generalize this into some helper functions?

python/cuspatial/cuspatial/tests/test_geodataframe.py Outdated Show resolved Hide resolved
python/cuspatial/cuspatial/core/geodataframe.py Outdated Show resolved Hide resolved
python/cuspatial/cuspatial/core/geodataframe.py Outdated Show resolved Hide resolved
python/cuspatial/cuspatial/core/geodataframe.py Outdated Show resolved Hide resolved
@thomcom
Copy link
Contributor Author

thomcom commented Sep 23, 2022

Sure! I have done so in the latest commit. If you approve I'll merge soon.

@thomcom thomcom requested a review from isVoid September 23, 2022 18:16
@thomcom
Copy link
Contributor Author

thomcom commented Sep 23, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 23db10f into rapidsai:branch-22.10 Sep 23, 2022
rapids-bot bot pushed a commit that referenced this pull request Sep 30, 2022
This PR adds `docs/source/user_guide/index.ipynb`, a comprehensive description of the APIs available in cuspatial python and example code for each.

The APIs are separated in a table of contents by the logical structure we've settled on for their location in the API. The demonstrate uses the `cuspatial.` version of every API, none are accessed using their full python package address.

At the bottom I'm working on some examples of performing `contains` and `within`, DE-9IM operations that can be performed easily with `point-in-polygon`. Otherwise the document is complete.

Depends on #685 and #680

This contributes to or closes #599 by providing an example use case of all python APIs.

Authors:
  - H. Thomson Comer (https://github.com/thomcom)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Michael Wang (https://github.com/isVoid)

URL: #666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change Python Related to Python code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] GeoDataframe has broken slicing.
2 participants