Goal: I want to find cut values with max equal bins using qcut given a q value. But I have to try one by one to find it. Here is the details:
max_bin = 12
pd.qcut([0,1,1,2,3,3,4,4,5,6,7],q=max_bin)
It would raised ValueError: Bin edges must be unique.Then I try 11 it works.
Hope: Set a function that can automatically find max bins given a q values.