Binning
The idea of binning is to group some values into a specific category, thus reducing the amount of unique values in a dataset.
For example, let's say we're creating a column of numbers, like so:
df = op.create.dataframe(A=[1,2,3,31,6,-21,np.nan,2,4,6]) A (float64) ----------- 1 2 3 31 6 -21 nan 2 4
Here, we can group the values in low, medium, and high bins. For this, we can use the cut
method...