-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
ENH: expose additional kwargs in explode method to mirror GeoPandas API #246
Conversation
Failing on GeoSeries since the |
Can you define it on |
The CI failure looks unrelated. I'll take a look at that later. It might be worth adding a small unit test, just to verify that things are passing through correctly (and to make sure they don't break in the future). |
Thanks for the tip on defining them separately. I'll look at creating a unit test. |
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 for the PR! The code looks good, would indeed be good to add a basic test using one of the keywords.
Co-authored-by: Joris Van den Bossche <[email protected]>
Co-authored-by: Joris Van den Bossche <[email protected]>
Would I add that as a new function in |
Yes, a new function. You might be able to adapt a geopandas test like https://github.com/geopandas/geopandas/blob/dc695ee93113af5d1a93a5740ecd792c2b9d19b3/geopandas/tests/test_geom_methods.py#L1003. |
The unit tests for the e.g. with
returns error
My inclination is to reset the index after calling compute on the Dask geoseries:
but I'm not familiar enough with unit testing and dask to know if that's an appropriate way to handle it. |
… GeoSeries and GeoDataFrame
Getting a lot of test failures after refreshing my fork. Looks like something with pyarrow strings? |
Apologies for the slow follow-up. Indeed those failures were cased by something else, which has been fixed in the meantime. I also added the equivalent change to the new dask-expr based implementation. |
Your fix to create the expected result manually with the different index was still failing for the older geopandas or dask version. But so just added a skip for those older versions, as I don't think it is worth complicating the test for that. |
@ebkurtz Thanks again for the PR and apologies it took so long to get merged! |
Expose
index_parts
,column
, andignore_index
parameters in the.explode()
method to mirror GeoPandas API. This allows supressing FutureWarning forindex_parts
, see #245