Is there a way to remove entries from a counter object if the value matches a certain condition. For example:
Counter({'a': 1142,'b':1004,'c':100,'d':5})
I want to drop all indexes where it is less than 1000, so I just have 'a' and 'b' left. I know I can loop through each and then delete if it doesnt match the condition as shown in this solution. Just looking for a more efficient way.