I have a dataframe and values are repeated in a column called label, I want to show only the two that are repeated the most........
I attach an image as an example
I tried
# the name of colums is label
# the name of dataframe is pd_data
filter = \['a','b'\]
pd_data = pd_data\[\~pd_data.labels.isin(filter)\]
print(len(pd_data))
pd_data.groupby('label').size().sort_values(ascending=False)