Answers for "pandas fill rows with entries occuring less often"

0

pandas fill rows with entries occuring less often

df.loc[df[col].value_counts()[df[col]].values < 10, col] = "RARE_VALUE"
Posted by: Guest on April-02-2022

Python Answers by Framework

Browse Popular Code Answers by Language