-
Notifications
You must be signed in to change notification settings - Fork 158
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
Allow None rows in GeoSeries
and an align
method to match GeoPandas
#760
Allow None rows in GeoSeries
and an align
method to match GeoPandas
#760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, lgtm.
Pending one (non-blocking) question about design here: #760 (comment)
Co-authored-by: Michael Wang <[email protected]>
rerun tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could use more explanation of "align".
>>> polygons_right = gpd.GeoSeries([ | ||
Point((-2, -2)), | ||
Point((-8, -8)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called polygons_right if it contains Point
s, not Polygon
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy/pasto
|
||
def align(self, other): | ||
""" | ||
Align the rows of two GeoSeries using outer join. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean to align the rows of geoseries? I think a more detailed explanation would help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will write one that covers this implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I increased the docs, explaining three use cases, and provided examples for them. Please approve and merge @harrism .
@gpucibot merge |
Description
This PR allows us to have
GeoSeries
with empty rows containingNone
. This feature is used by GeoPandas frequently with binary operations onGeoSeries
of different lengths. It also adds analign
method which works with default arguments for aligning the indices of aSeries
and adding None where rows are missing.I also updated the internals for
GeoColumn
,GeoSeries
, andGeoDataFrame
to handle native_gather
operations from cudf correctly. This eliminates the need to usecolumn._data
as a reordering map whensort_values
is used on a non-geometry column, and should support more hidden cudf operations that we haven't attempted yet.Closes #762
Closes #761
Checklist