title: Pandas qcut "ValueError: Bin edges must be unique"
body: <p>Yes I know there are <a href="https://stackoverflow.com/questions/44639189/pandas-qcut-error-valueerror-bin-edges-must-be-unique">many</a> <a href="https://stackoverflow.com/questions/41475398/pd-qcut-valueerror-bin-edges-must-be-unique">questions</a> <a href="https://stackoverflow.com/questions/38309144/qcut-pandas-valueerror-bin-edges-must-be-unique">like</a> <a href="https://stackoverflow.com/questions/36880490/why-use-pandas-qcut-return-valueerror-bin-edges-must-be-unique">this</a>.</p>
  
  <p>This question is about a specific behavior:</p>
  
  <pre><code>import pandas as pd
  x = [
      0,0,0,0,
      1,1,1,
      2,2,2,
      3,3,3
  ]
  
  print pd.qcut(x, 4)
  # ValueError: Bin edges must be unique: array([0, 0, 1, 2, 3]).
  </code></pre>
  
  <p>I had assumed <code>qcut</code> would produce edges <code>(0,1], (1,2], (2,3], (3, 3)</code>, which would bin the items how I visually organized them. This obviously has to something to do with left-inclusivity and right-exclusivity but intuitively it feels like <code>x</code> can be discretized into four parts.</p>
  
  <p>Does anyone have a sense of what I'm missing?</p>