geopandas/dask-geopandas

FutureWarning for index_parts parameter in GeoDataFrame.explode()

ebkurtz opened this issue · 3 comments

I am calling the .explode() method on a dask GeoDataFrame which results in the warning:

FutureWarning: Currently, index_parts defaults to True, but in the future, it will default to False to be consistent with Pandas. Use index_parts=True to keep the current behavior and True/False to silence the warning.

I tried passing index_parts=False which results in an error:

TypeError: _Frame.explode() got an unexpected keyword argument 'index_parts'

Is it possible to have the method accept an index_parts argument to silence the warning? I believe this is the relevant piece of code, line 377 in core.py:

@derived_from(geopandas.geodataframe.GeoDataFrame)
def explode(self):
    return self.map_partitions(self._partition_type.explode, enforce_metadata=False)

Willing to help out with code changes, just wanted to see what the approach should be.

Yes, we should mirror the api from geopandas. Which means exposing additional keywords here.

Great, I will make a fork and attempt a fix.