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

Uninformative AttributeError for aggregation methods #288

Open
chandley564 opened this issue Apr 9, 2024 · 0 comments
Open

Uninformative AttributeError for aggregation methods #288

chandley564 opened this issue Apr 9, 2024 · 0 comments

Comments

@chandley564
Copy link

chandley564 commented Apr 9, 2024

Issue

Since the change to dask-expr as a backend for DataFrames aggregation methods (like dissolve) raise an uninformative attribute error. The methods are still avaliable using a legacy dataframe (accessed through dask_df.to_legacy_dataframe()) so the error messaging could be updated to reflect this. Also, dask-expr documentation mentions that these methods are not supported, however I couldn't find any reference to the change in the dask-geopandas documentation.

Example

import geopandas as gpd
import dask_geopandas as dgpd

path_to_gdf = ...

gdf = gpd.read_file(path_to_gdf)
dask_gdf = dgpd.from_geopandas(gdf, npartitions=20)
dissolved = dask_gdf.dissolve()

Output

AttributeError: 'DataFrame' object has no attribute 'dissolve'

Enviroment

dask

Name: dask
Version: 2024.4.0
Summary: Parallel PyData with Task Scheduling
Home-page:
Author:
Author-email:
License: BSD-3-Clause
Location: ...
Requires: click, cloudpickle, fsspec, importlib-metadata, packaging, partd, pyyaml, toolz
Required-by: dask-expr, dask-geopandas, dask-image, datacube, datashader, distributed, nlm, odc-stac, stackstac

dask-geopandas

Version: 0.3.1
Summary: Parallel GeoPandas with Dask
Home-page: https://github.com/geopandas/dask-geopandas
Author:
Author-email:
License: BSD
Location: ...
Requires: dask, distributed, geopandas, packaging
Required-by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant