Python Collections module offers a set of container data types that extend the features of stock containers like Lists, Tuples, Sets, and Dictionaries. With these special containers, you not only have the features of stock containers, but also some extra methods which come in very handy for certain tasks.

By the end of this tutorial, you’ll have the knowledge of the following:

  • What is the collections module?
  • Various functions like :
  1. Counter
  2. ChainMap
  3. Deque
  4. Named Tuple
  • Working examples

The Collections module comes pre-installed in Python so we don’t need to pip install it. We can just import it and you’re ready to go! Let’s go into the most used functions in detail.

#data science #collection #collection module #python #python collection module #python module

Python Collections Module: Counter, ChainMap, Deque & Tuple | upGrad blog
1.20 GEEK