AI engineering glossary · NumPy pandas visualization
What is binning?
Binning (also called cut, qcut, discretisation): Converting a continuous numeric column into labelled ranges. In pandas, cut makes bins with chosen edges, while qcut makes bins holding roughly equal numbers of rows (quantiles). This is used to make age groups, income bands or risk tiers.
Binning: an example
pd.cut(df['age'], [0, 18, 35, 60, 120], labels=['child', 'young', 'adult', 'senior']) assigns each person an age group.
Related terms
More NumPy pandas visualization terms
Where you learn it
Binning is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.