title: Error when assigning numeric labels to graph
body: <p>I am trying to assign the numeric label values to the lollipop graph I created. I wanted the numeric label to appear at the end of each vertical lollipop. I developed the following script, yet I got a mistake I do not understand.</p>
  
  <p>'gap_%' is my variable of interest:</p>
  
  <p><a href="https://i.stack.imgur.com/VkCCj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VkCCj.png" alt="enter image description here"></a></p>
  
  <p>and here is the script I used:</p>
  
  <pre><code>ordered_fa_country = country.sort_values(by='gap_%')
  
  my_range_country =range(1,len(country.index)+1)
  
  a4_dims = (10, 12)
  
  f, ax = plt.subplots(figsize=a4_dims)
  
  sns.despine(offset=50)
  sns.set_context("talk")
  
  plt.hlines(y=my_range_country, xmin=0, xmax= ordered_fa_country['gap_%'], color='skyblue')
  plt.plot(ordered_fa_country['gap_%'], my_range_country, "o")
  
  ### Add titles and axis names
  plt.yticks(my_range_country, ordered_fa_country['Country'])
  plt.title("Gap as % - 2018", loc='left')
  
  
  for i in my_range_country:
          x = 21 - i
          y = ordered_fa_country['gap_%'][i-1]
          ax.text(y + 2,x,str(y))
  </code></pre>
  
  <p>here is the error I get:</p>
  
  <pre><code>---------------------------------------------------------------------------
  KeyError                                  Traceback (most recent call last)
  &lt;ipython-input-109-6f64ab63f14f&gt; in &lt;module&gt;()
       22 for i in my_range_country:
       23         x = 21 - i
  ---&gt; 24         y = ordered_fa_country['gap_%'][i-1]
       25         ax.text(y + 2,x,str(y))
       26 
  
  ~\Anaconda3\lib\site-packages\pandas\core\series.py in __getitem__(self, key)
      765         key = com._apply_if_callable(key, self)
      766         try:
  --&gt; 767             result = self.index.get_value(self, key)
      768 
      769             if not is_scalar(result):
  
  ~\Anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_value(self, series, key)
     3116         try:
     3117             return self._engine.get_value(s, k,
  -&gt; 3118                                           tz=getattr(series.dtype, 'tz', None))
     3119         except KeyError as e1:
     3120             if len(self) &gt; 0 and self.inferred_type in ['integer', 'boolean']:
  
  pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_value()
  
  pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_value()
  
  pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc()
  
  pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()
  
  pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()
  
  KeyError: 0
  </code></pre>
  
  <p>any suggestion?</p>