mirror of
https://github.com/wassname/geopandas.git
synced 2026-09-24 13:30:40 +08:00
Ensure that key is a string before compare
Fixes boolean indexing on GeoDataFrame
This commit is contained in:
@@ -147,7 +147,7 @@ class GeoDataFrame(DataFrame):
|
||||
that it is returned as one
|
||||
"""
|
||||
col = super(GeoDataFrame, self).__getitem__(key)
|
||||
if key == 'geometry':
|
||||
if isinstance(key, basestring) and key == 'geometry':
|
||||
col.__class__ = GeoSeries
|
||||
col.crs = self.crs
|
||||
return col
|
||||
|
||||
Reference in New Issue
Block a user