title: Pandas & Plotly: how to access data columns in the hover text that are not used to plot the point?
body: <p>Plotly's docs show a <a href="https://plot.ly/python/reference/#scatter-hovertemplate" rel="nofollow noreferrer">hovertemplate</a> that provides access the x &amp; y values in the text, but how can we access data in the other columns?</p>
  
  <p>Imports:</p>
  
  <pre><code>import pandas as pd  
  import plotly.plotly as py
  import plotly.graph_objs as go
  from plotly.offline import download_plotlyjs, init_notebook_mode, plot
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>test_data = {"client1-percent":[90,100,60]
               , "client1-volume":[500000,3542,20000]
               , "client2-percent":[99,63,98]
               ,"client2-volume":[6423,6524,5737]
              }
  df = pd.DataFrame(test_data)
  
  data = [go.Scatter(
      x = df.index.values
      , y = df.loc[:,col].values
      , hovertemplate = "Percent: %{y:.1f}% | Volume: {}"
      , mode = 'lines+markers'
      , name = col.replace("-percent","")
  ) for col in df.columns if "-volume" not in col]
  
  plot(data, filename='test.html')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/51pYm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/51pYm.png" alt="enter image description here"></a></p>
  
  <p>So the specific question here is this: how can client volume be added to the text in this plotly tooltip?</p>