📅  最后修改于: 2022-03-11 14:45:48.446000             🧑  作者: Mango
counts_col2 = df.groupby("Col2")["Col2"].transform(len)
counts_col3 = df.groupby("Col3")["Col3"].transform(len)
mask = (counts_col2 > 5) & (counts_col3 > 5)
df[mask]