How To Discretize/Bin a Variable in Python with NumPy and Pandas?

Sometimes you may have a quantitative variable in your data set and you might want to discretize it or bin it or categorize it based on the values of the variable. For example, let us say you have measurements of height and want to discretize it such that it is 0 or 1 depending on… Continue reading How To Discretize/Bin a Variable in Python with NumPy and Pandas?