gmaps
gmaps copied to clipboard
Allow pandas series as value to `info_box_content`
The following should work:
import gmaps
import gmaps.datasets
gmaps.configure(api_key="AI...")
df = gmaps.datasets.load_dataset_as_df('starbucks_kfc_uk').sample(200)
fig = gmaps.figure()
marker_layer = gmaps.marker_layer(
df[['latitude', 'longitude']],
info_box_content=df['chain_name']
)
fig.add_layer(marker_layer)
fig
At the moment, we have to call .values on df['chain_name'] for this example to work. See issue #200.