Python, Pandas, Data Science, Machine Learning, Pandas Dataframe.
(df["Age"] > 80) #140 µs ± 11.8 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) #isin %timeit df["Old"] = df["Age"].isin(range(80,100)) #17.4 ms ± 466 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) #bins with digitize %timeit df["Age_Bins"] = np.digitize(df["Age"].values,