Hiding ID in hover box in px.choropleth_mapbox

Hi @Pololnger,

try this:

fig = px.choropleth_mapbox(df, geojson=geo, locations='id', color='a', featureidkey="properties.cca_2",
                           hover_name = 'Location_Name', hover_data = {'a':True,'b':True, 'c':True, 'id':False}

it is written in the help:

hover_data: list of str or int, or Series or array-like, or dict
    Either a list of names of columns in `data_frame`, or pandas Series, or
    array_like objects or a dict with column names as keys, with values
    True (for default formatting) False (in order to remove this column**
    from hover information)**, or a formatting string, for example ':.3f' or
    '|%a' or list-like data to appear in the hover tooltip or tuples with a
    bool or formatting string as first element, and list-like data to
    appear in hover as second element Values from these columns appear as
    extra data in the hover tooltip.

hope this helps , Alex-

2 Likes