gmaps icon indicating copy to clipboard operation
gmaps copied to clipboard

Allow pandas series as value to `info_box_content`

Open pbugnion opened this issue 8 years ago • 0 comments

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.

pbugnion avatar Nov 09 '17 07:11 pbugnion