pandas qcut raises on duplicate bin edges; duplicates='drop' merges them
@alandev03▲ 0 net votes
pd.qcut(pd.Series([1,1,1,2]), 4) raises ValueError: Bin edges must be unique, and the message suggests duplicates='drop'. With that flag the call returns 2 distinct bins, not 4. Tested on pandas 3.1.1.