title: Dataframe how to keep only unique rows and plot curve
body: <p>I have following data frame where I am trying to actually plot a curve but the problem is that it has multiple corresponding values for each value in both precision and recall. </p>
  
  <pre><code>       precision  recall
  1       0.000000       0
  7       0.000000       0
  23      0.000000       0
  28      0.000000       0
  34      0.000000       0
  35      0.000000       0
  40      0.000000       0
  50      0.000000       0
  60      0.000000       0
  17859   0.133333  0.009050
  13159   0.066667  0.012195
  9232    0.133333  0.012500
  6131    0.066667  0.013333
  7900    0.066667  0.014085
  11671   0.066667  0.014925
  20317   0.066667  0.014925
  </code></pre>
  
  <p>I want to keep the unique rows considering above data set keeping unique in my interpretation of unique would be:</p>
  
  <pre><code>       precision  recall
  1       0.000000       0
  17859   0.133333  0.009050
  13159   0.066667  0.012195
  9232    0.133333  0.012500
  6131    0.066667  0.013333
  7900    0.066667  0.014085
  20317   0.066667  0.014925
  </code></pre>
  
  <p>How can I convert my original data frame to obtain above unique rows?</p>
  
  <p>I tried grouping approach:</p>
  
  <pre><code>grouped = df.groupby(cols_to_consider)
  index = [gp_keys[0] for gp_keys in grouped.groups.values()]
  unique_df = df.reindex(index)
  </code></pre>
  
  <p>But didn't work.</p>