df = pd.DataFrame([
[11, 'a'],
[12, 'b'],
[13, 'c'],
[13, 'd'],
[13, 'e'],
[0, 'zero'],
[1e3, 'kilo'],
]);
ids = df[0]
df[ids.isin(ids[ids.duplicated()])].sort_values(0)
0 1
2 13.0 c
3 13.0 d
4 13.0 e
df.sort_values(0).head(3)
0 1
3 0.0 zero
0 11.0 a
1 12.0 b