I have following dataframe:
Date Type Local 0 2015-01-02 B A12 1 2015-01-02 B A12 2 2015-01-02 B B23 3 2015-01-02 B B23 4 2015-01-02 B C4 I want to keep only those rows which have 'local' value, that appears >100 times in the df.
I have tried:
df = df[(df["local"].isin(df["local"].value_counts() > 100) == True)] df = df[(df["local"] == (df["local"].value_counts() > 100)] df = df[(df["local"] == (df["local"].value_counts() > 100)) == True] And none have worked. What am I missing here?