We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d43446e commit 0ae00cbCopy full SHA for 0ae00cb
Doc/library/collections.rst
@@ -358,7 +358,7 @@ Common patterns for working with :class:`Counter` objects::
358
list(c) # list unique elements
359
set(c) # convert to a set
360
dict(c) # convert to a regular dictionary
361
- c.items() # create a view of the dictionary’s items (elem, cnt) pairs
+ c.items() # access the (elem, cnt) pairs
362
Counter(dict(list_of_pairs)) # convert from a list of (elem, cnt) pairs
363
c.most_common()[:-n-1:-1] # n least common elements
364
+c # remove zero and negative counts
0 commit comments