geopandas.GeoSeries.is_empty¶
- property GeoSeries.is_empty¶
Returns a
Series
ofdtype('bool')
with valueTrue
for empty geometries.See also
GeoSeries.isna
detect missing values
Examples
An example of a GeoDataFrame with one empty point, one point and one missing value:
>>> from shapely.geometry import Point >>> d = {'geometry': [Point(), Point(2, 1), None]} >>> gdf = geopandas.GeoDataFrame(d, crs="EPSG:4326") >>> gdf geometry 0 GEOMETRYCOLLECTION EMPTY 1 POINT (2.00000 1.00000) 2 None >>> gdf.is_empty 0 True 1 False 2 False dtype: bool