Ensure that key is a string before compare

Fixes boolean indexing on GeoDataFrame
This commit is contained in:
Jake Wasserman
2013-08-22 13:32:45 -04:00
parent 3ebcae071d
commit df00e62d46
+1 -1
View File
@@ -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