I\'m trying to infer a classification according to the size of a person in a dataframe like this one:
Size 1 80000 2 8000000 3 8000000000 ... <
You can use pd.cut function:
bins = [0, 1000000, 10000000, 50000000, ...] labels = ['<1m','1-10m','10-50m', ...] df['Classification'] = pd.cut(df['Size'], bins=bins, labels=labels)