title: Dataframe index Error orient in jupyter notebook
body: <p>while trying to reproduce this example : <a href="https://github.com/ipython-books/cookbook-2nd-code/blob/master/chapter14_graphgeo/02_airports.ipynb" rel="nofollow noreferrer">https://github.com/ipython-books/cookbook-2nd-code/blob/master/chapter14_graphgeo/02_airports.ipynb</a> I get the following error on this code :</p>
  
  <pre><code>pos = {airport: (v['lon'], v['lat'])
         for airport, v in airports_us.to_dict('index').items()}
  </code></pre>
  
  <p>the output is :</p>
  
  <pre><code>ValueError                                Traceback (most recent call last)
  &lt;ipython-input-121-59fee485c0ec&gt; in &lt;module&gt;
        1 
        2 pos = {airport: (v['lon'], v['lat'])
  ----&gt; 3        for airport, v in airports_us.to_dict('index').items()}
  
  ~\Anaconda3\lib\site-packages\pandas\core\frame.py in to_dict(self, orient, into)
     1314             if not self.index.is_unique:
     1315                 raise ValueError(
  -&gt; 1316                     "DataFrame index must be unique for orient='index'."
     1317                 )
     1318             return into_c((t[0], dict(zip(self.columns, t[1:])))
  
  ValueError: DataFrame index must be unique for orient='index'.
  </code></pre>