I want to cut and label the values in multiple columns. Basically this:
df[numericColumn] = pd.cut(df[numericColumn], 3, labels=["small", "medium", "big"])
I found this code (which works) but doesn't do the labelling I want, when I replace bin with labelling it errors out and says I need to include a bin
df = pd.DataFrame(np.random.rand(10,4))
df.apply(pd.cut, bins=[0,0.5,1])
Is there a way to cut label multiple columns in pandas?