Is there any way to use np.digitize when I want to define the number of bins?

146 views Asked by At

I have big data where i have a numerical column. I simply want to convert the in a groups.

I think pd.np.digitize( df.col, bins = [10, 20, 30] ) could be the solution but I can't define here bins as I have high amount of values.

In my case, I want to define i.e 300 bins and then all the values should be grouped based on that... IS there any way to use np.digitize?

0

There are 0 answers