Python, Pandas, Data Science, Machine Learning, Pandas Dataframe.
val <= 50000 and val > 10000: return "Mid Level" else: return "Low" df["Salary_Category"] = df["Salary"].apply(foo) print(df["Salary_Category"]) """ 0 High 1 High 2 Mid Level 3 High 4 Low ... 999995 High 999996 Low 999997 High 999998 High 999999 Mid Level Name: Salary_Category, Length: 1000000,