subset based on frequency level [duplicate]
问题 This question already has answers here : Subset data frame based on number of rows per group (3 answers) Closed 2 years ago . I want to generate a df that selects rows associated with an "ID" that in turn is associated with a variable called cutoff. For this example, I set the cutoff to 9, meaning that I want to select rows in df1 whose ID value is associated with more than 9 rows. The last line of my code generates a df that I don't understand. The correct df would have 24 rows, all with