mirror of
https://github.com/wassname/geopandas.git
synced 2026-10-03 12:31:14 +08:00
Use pd.notnull() not bool()
bool(np.nan) evaluates to True. notnull() should be more of what we want here.
This commit is contained in:
1 parent
301a26cf1c
commit
3f20779237
1 file changed
+2
-1
+2
-1
@@ -6,6 +6,7 @@ from shapely.ops import cascaded_union, unary_union
|
||||
import shapely.affinity as affinity
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from pandas import Series, DataFrame, MultiIndex
|
||||
|
||||
import geopandas as gpd
|
||||
@@ -70,7 +71,7 @@ class GeoPandasBase(object):
|
||||
else:
|
||||
stream = ((i, item.bounds, idx) for i, (idx, item) in
|
||||
enumerate(self.geometry.iteritems()) if
|
||||
item and not item.is_empty)
|
||||
pd.notnull(item) and not item.is_empty)
|
||||
try:
|
||||
self._sindex = SpatialIndex(stream)
|
||||
# What we really want here is an empty generator error, or
|
||||
|
||||
Reference in new issue
Block a user