Skip to content

"Cannot open data source" error after dropna #21

@kadirsahbaz

Description

@kadirsahbaz

I use the following lines to open shapefile as GeoDataFrame, drop NaN values and use the final GeoDataFrame without NaN values in pygeoda. But after dropna pygeoda throws this error: ValueError: pygeoda can't open current data source. Please use either a file path of an ESRI shapefile or a GeoPandas instance., However, both gdf1 and gdf2 are GeoDataFrame with many rows.

gdf1 = gpd.read_file("/home/user/test.shp")
print(type(gdf1))
# OUT <class 'geopandas.geodataframe.GeoDataFrame'>
data1 = pygeoda.open(gdf1) # No Error here

gdf2 = gdf1.dropna()
print(type(gdf2))
# OUT <class 'geopandas.geodataframe.GeoDataFrame'>
data2 = pygeoda.open(gdf2) # ERROR

geopandas v0.9.0 and 0.10.0
pygeoda v0.0.8-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions