-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add reset_index
to GeoSeries
and GeoDataFrame
#856
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.
I think reset_index
for GeoSeries can be optimized a bit. But too late here.. Just sigining off for first round.
if not drop and inplace: | ||
pytest.skip( | ||
"For exception checks, see " | ||
"test_reset_index_dup_level_name_exceptions" |
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.
Is this just a left over from cudf?
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.
It is copied over from cudf, yes. I could rewrite the parameterizations so that this invalid case never occurs. If drop == False and inplace == True for a series reset_index
an exception is thrown. Since the result has to be a GeoDataFrame
, inplace is impossible. cudf just built a matrix of parameterizations and skips the impossible ones.
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 see, if it's expected to fail, instead of skipping, should we just wrap it in pytest.raises
block?
@gpucibot merge |
Closes #849
Description
This PR adds
.reset_index
toGeoSeries
andGeoDataFrame
. It testsGeoDataFrame
to the same level thatcudf
tests the method. HoweverGeoSeries
has four blocks of parameterized tests numbering in the hundreds. I only implement the first test block forGeoSeries
.Checklist