Question: this is my dataframe

```
df = pd.DataFrame({'Col1':['Joe','Bob','Joe','Joe'],
                  'Col2':[55,25,88,80]})

```

I only want the names of if it appears more than once in 'Col1'

I can do it like this

```
grouped = df.groupby("Col1")
grouped.filter(lambda x: x["Col1"].count()>2)['Col1'].unique()

```

However that is ugly looking code

Is there simpler cleaner way?

Answer: 
Use `value_counts` and `isin`

```
vc = df.Col1.value_counts() > 2
vc = vc[vc]

df.loc[df.Col1.isin(vc.index)]

```

[![enter image description here](https://i.stack.imgur.com/fTVzR.png)](https://i.stack.imgur.com/fTVzR.png)
Here's a NumPy based solution using [`np.unique`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html) -

```
unq,count = np.unique(df.Col1,return_counts=True)
out = unq[count>n]

```

Sample run -

```
In [34]: df
Out[34]: 
  Col1  Col2
0  Joe    55
1  Bob    25
2  Joe    88
3  Joe    80
4  Joe    44
5  Bob    24
6  Joe    45

In [35]: unq,count = np.unique(df.Col1,return_counts=True)

In [36]: unq[count>3] # n = 3
Out[36]: array(['Joe'], dtype=object)

```