martinfleis / geopandas-view

Interactive exploration of GeoPandas GeoDataFrames
BSD 3-Clause "New" or "Revised" License
29 stars 4 forks source link

BUG: field names in tooltip/popup must be strings #13

Closed martinfleis closed 3 years ago

martinfleis commented 3 years ago

Having a GeoDataFrame with integers as column names causes a failure of tooltip/popup. We should coerce all to strings in _tooltip_popup.

df = gpd.read_file(gpd.datasets.get_path('nybb'))
df[4] = 'string'

AssertionError: The field 4 is not available in the data. Choose from: ('4', 'BoroCode', 'BoroName', 'Shape_Area', 'Shape_Leng').