title: Python_Function for customdata hover in plotly lib
body: <p>In the code below I tried to use customdata to make hovertemplate, but in this case on visualization it shows only data from the first row everywhere. I believe there should be function, but don't know how to implement it.</p>
  
  <pre><code>import plotly.express as px
  import plotly.graph_objs as go
  import pandas as pd
  
  rows=[['501-600','15','122.58333','45.36667'],
        ['till 500','4','12.5','27.5'],
        ['more 1001','41','-115.53333','38.08'],
        ]
  
  colmns=['bins','data','longitude','latitude']
  df=pd.DataFrame(data=rows, columns=colmns)
  df = df.astype({"data": int})
  
  fig=px.scatter_geo(df,lon='longitude', lat='latitude',
                        color='bins',
                        opacity=0.5,
                        size='data',
                        projection="natural earth")
  
  new_customdata = df.loc[:,('bins', 'data')]
  fig.update_traces(go.Scattergeo(
  customdata=new_customdata,
  hovertemplate="&lt;b&gt;%{customdata[0]} &lt;/b&gt;&lt;br&gt;&lt;br&gt;" + \
                "blablabla: %{customdata[1]: .3f}&lt;extra&gt;&lt;/extra&gt;"))
  
  fig.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CZN3j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CZN3j.png" alt="Data in hover must be: till 500 and 4"></a></p>