Let's say I have the Pandas dataframe with columns of different measurement attributes and corresponding measurement values.
ID Parameter Value
0 'A' 4.3
1 'B' 3.1
2 'C' 8.9
3 'A' 2.1
4 'A' 3.9
. . .
. . .
. . .
100 'B' 3.8
How can I filter this dataframe to only have measurements that appear more than X number of times? For example, for this dataframe I want to get all rows with more than 5 measurements (lets say only parameters 'A' and 'B' appear more than 5 times) to get a dataframe like below.
ID Parameter Value
0 'A' 4.3
1 'B' 3.1
3 'A' 2.1
. . .
. . .
. . .
100 'B' 3.8
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…