title: How can I add text labels to a Plotly scatter plot in Python?
body: <p>I'm trying to add text labels next to the data points in a Plotly scatter plot in Python but I get an error.  </p>
  
  <p>How can I do that?</p>
  
  <p>Here is my dataframe: </p>
  
  <pre><code>world_rank  university_name country teaching    international   research    citations   income  total_score num_students    student_staff_ratio international_students  female_male_ratio   year
  0   1   Harvard University  United States of America    99.7    72.4    98.7    98.8    34.5    96.1    20,152  8.9 25% NaN 2011
  </code></pre>
  
  <p>Here is my code snippet:</p>
  
  <pre><code>citation = go.Scatter(
                      x = "World Rank" + timesData_df_top_50["world_rank"],  &lt;--- error
                      y = "Citation" + timesData_df_top_50["citations"], &lt;--- error
                      mode = "lines+markers",
                      name = "citations",
                      marker = dict(color = 'rgba(48, 217, 189, 1)'),
                      text= timesData_df_top_50["university_name"])
  </code></pre>
  
  <p>The error is shown below.</p>
  
  <pre><code>TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('&lt;U32') dtype('&lt;U32') dtype('&lt;U32')
  </code></pre>