intent: How to subset a data frame using Pandas based on a group criteria?
rewritten_intent: select records of dataframe `df` where the sum of column 'X' for each value in column 'User' is 0
snippet: df.groupby('User')['X'].filter(lambda x: x.sum() == 0)