Here an example:
df = pd.DataFrame({
'file': ['file1','file1','file1','file1','file2','file3','file4','file4','file4','file4'],
'text': ['Text1','Text2','Text3','Text4','Text5','Text6','Text7','Text8','Text9','Text10'],
})
I need to remove rows which 'file' repeat 4 time, so in this example i need to remove rows where file = file1 and file4