Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Python Collections Tutorial | Edureka

41 visualizaciones

Publicado el

YouTube Link: https://youtu.be/QswQA1lRIQY
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Collections In Python' will cover the concepts of Collection data type in python along with the collections module and specialized collection data structures like counter, chainmap, deque etc. Following are the topics discussed:
What Are Collections In Python?
What Is A Collection Module In Python?
Specialized Collection Data Structures

Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in

Publicado en: Tecnología
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Python Collections Tutorial | Edureka

  1. 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
  2. 2. What Are Collections In Python? What Is A Collections Module In Python? www.edureka.co/python Specialised Collections Data Types
  3. 3. www.edureka.co/python
  4. 4. www.edureka.co/python There are four collection data types in python which are used to store collections of data. LISTS TUPLES SETS DICTIONARY
  5. 5. What Is A Collections Module In Python? www.edureka.co/python
  6. 6. What Is A Collection Module In Python? www.edureka.co/python COLLECTIONS Specialised Collection data structures
  7. 7. www.edureka.co/python
  8. 8. Specialised Collections Data Types www.edureka.co/python defaultdict namedtuple() UserString UserDict Chainmap UserList OrderedDict Counter deque
  9. 9. namedtuple() www.edureka.co/python namedtuple() returns a tuple with a named value for each element in the tuple. Details = (name= ‘edureka’ , course=‘python’ , course2= ‘data science’)
  10. 10. deque www.edureka.co/python deque pronounced as ‘deck’ is an optimised list to perform insertion and deletion easily. Deque( [ ‘e’ , ’d’ , ’u’ , ’r’ ,’e’ , ’k’ , ’a’ ] )
  11. 11. Chainmap www.edureka.co/python Chainmap is a dictionary like class for creating a single view of multiple mappings. A = { 1: ‘edureka’ , 2: ‘python’} B = { 3: ‘data science’ , 4: ‘AI’} [ {1: ‘edureka’ , 2: ‘python’} , {3: ‘data science’, 4: ‘AI’} ]
  12. 12. Counter www.edureka.co/python Counter is a dictionary subclass for counting hashable objects.. A = [1,2,1,2,1,2,3,4,5,6,7,2,1,2] Count = Counter(a) Counter( {1:4 , 2:5 , 3:1 , 4:1 , 5:1 , 6:1, 7:1})
  13. 13. OrderedDict www.edureka.co/python OrderedDict is dictionary subclass which remembers the order in which the entries were done. od = collections.OrderedDict() od[‘a’] = 2 od[’b’] = 1 od[‘c’] = 3 Print(od) OrderedDIct( { [ (a ,2) , (b, 1 ), (c ,3 ) ] )
  14. 14. defaultdict www.edureka.co/python defaultdict is a dictionary subclass which calls a factory function to supply missing values. D = defaultdict(int) D[‘edureka’] = 1 D[‘python’] = 2 Print(D[‘java’] Output : 0
  15. 15. UserDict, UserList, UserString www.edureka.co/python UserDict is a wrapper around dictionary objects for easier dictionary sub-classing. UserList is a wrapper around list objects for easier List sub-classing. UserString is a wrapper around string objects for easier string sub-classing.
  16. 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. www.edureka.co
  17. 17. www.edureka.co/python

×