select records of dataframe `df` where the sum of column 'x' for each value in column 'user' is 0,df.groupby('User')['X'].filter(lambda x: x.sum() == 0)