Skip to main content

Python 3: Deep Dive (Part 3 - Dictionaries, Sets, JSON)

21h 58m 5s
English
Paid

Course description

This course is an in-depth look at Python dictionaries. Dictionaries are ubiquitous in Python. Classes are essentially dictionaries, modules are dictionaries, namespaces are dictionaries, sets are dictionaries and many more.

Read more about the course

In this course we'll take an in-depth look at:

  • associative arrays and how they can be implemented using hash maps

  • hash functions and how we can leverage them for our own custom classes

  • Python dictionaries and sets and the various operations we can perform with them

  • specialized dictionary structures such  as OrderedDict and how it relates to the built-in Python3.6+ dict

  • Python's implementation of multi-sets, the Counter class

  • the ChainMap class

  • how to create custom dictionaries by inheriting from the UserDict class

  • how to serialize and deserialize dictionaries to JSON

  • the use of schemas in custom JSON deserialization

  • a brief introduction to some useful libraries such as JSONSchema, Marshmallow, PyYaml and Serpy

Please note that this is a relatively advanced Python course, and a strong knowledge of some topics in Python is required. 

Beyond the basics of Python (loops, conditional statements, exception handling, built-in data types, creating classes, etc), you should also have an in-depth understanding of the following topics:

  • functions and functional programming (recursion, *args, **kwargs, zip, map, sorted, any, all, etc)

  • lambdas, closures and decorators (including standard decorators such as @singledispatch, @wraps, etc)

  • iterables, iterators, generators and context managers

  • named tuples

  • variable scopes and namespaces (globals, locals, etc)

For this course you will also need to install some 3rd party libraries, so you need to be comfortable with doing this using the tool of your choice (e.g. pip, conda, etc)

Finally, most of the code in this course is illustrated using the freely available  Jupyter Notebooks, so you will need that as well.

Requirements:
  • This is an advanced course, so a solid Python foundation is necessary
  • Jupyter Notebooks
  • functional programming (zip, map, sorted, any, all, etc)
  • lambdas, closures and decorators
  • built-in decorators such as @lru_cache, @singledispatch and @wraps
  • iterables, iterators, generators and context managers
  • variable scopes and namespaces (globals, locals, etc)
  • ability to install 3rd party libraries (e.g. pip install)
Who this course is for:
  • Python developers who want a deeper understanding of Python dictionaries and related topics

What you'll learn:

  • Associative Arrays
  • Hash Tables and Hash Functions
  • Python's implementation of hash tables
  • Dictionaries and Sets
  • Defining hash functions for our custom classes and why that is useful
  • Creating customized dictionaries using the UserDict class
  • defaultdict
  • OrderedDict and Python3.6+ equivalences
  • Counter (multi-sets)
  • ChainMap
  • Serialization and Deserialization
  • JSON serialization/deserialization
  • Intro to JSONSchema, Marshmallow, PyYaml and Serpy 3rd party libraries

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 83 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: 1.1. Course Overview

All Course Lessons (83)

#Lesson TitleDurationAccess
1
1.1. Course Overview Demo
12:57
2
1.2. Prerequisites
07:23
3
2.1. Introduction
03:26
4
2.2. Associative Arrays
05:41
5
2.3. Hash Maps
24:13
6
2.4. Python Dictionaries
09:40
7
2.5. Python's hash() Function
08:04
8
3.1. Introduction
01:14
9
3.2. Creating Dictionaries - Lecture
13:10
10
3.3. Creating Dictionaries - Coding
24:02
11
3.4. Common Operations - Lecture
08:12
12
3.5. Common Operations - Coding
32:44
13
3.6. Dictionary Views - Lecture
10:42
14
3.7. Dictionary Views - Coding
30:13
15
3.8. Updating, Merging, and Copying - Lecture
12:21
16
3.9. Updating, Merging, and Copying - Coding
33:57
17
3.10. Custom Classes and Hashing - Lecture
20:26
18
3.11. Custom Classes and Hashing - Coding
33:55
19
4.1. Exercises
06:22
20
4.2. Solution 1
04:35
21
4.3. Solution 2
02:05
22
4.4. Solution 3
07:15
23
4.5. Solution 4
05:23
24
5.1. Introduction
01:56
25
5.2. Basic Set Theory
12:36
26
5.3. Python Sets
08:59
27
5.4. Creating Sets - Lecture
03:41
28
5.5. Creating Sets - Coding
14:46
29
5.6. Common Operations - Lecture
03:13
30
5.7. Common Operations - Coding
15:18
31
5.8. Set Operations - Lecture
07:47
32
5.9. Set Operations - Coding
20:31
33
5.10. Update Operations - Lecture
06:09
34
5.11. Update Operations - Coding
21:08
35
5.12. Copying Sets - Lecture
01:14
36
5.13. Copying Sets - Coding
08:11
37
5.14. Frozen Sets - Lecture
06:55
38
5.15. Frozen Sets - Coding
26:38
39
5.16. Dictionary Views - Lecture
09:28
40
5.17. Dictionary Views - Coding
27:59
41
6.1. Project 1 - Goals
05:31
42
6.2. Project 1 - Solution
49:38
43
7.1. Introduction
04:30
44
7.2. Pickling - Lecture
05:58
45
7.3. Pickling - Coding
28:48
46
7.4. JSON Serialization - Lecture
07:23
47
7.5. JSON Serialization - Coding
22:30
48
7.6. Custom JSON Encoding - Lecture
02:31
49
7.7. Custom JSON Encoding - Coding
37:37
50
7.8. Using JSONEncoder - Lecture
11:37
51
7.9. Using JSONEncoder - Coding
34:01
52
7.10. Custom JSON Decoding - Lecture
16:36
53
7.11. Custom JSON Decoding - Coding
51:59
54
7.12. Using JSONDecoder - Lecture
01:31
55
7.13. Using JSONDecoder - Coding
41:02
56
7.14. JSON Schema
26:07
57
7.16. PyYaml
18:17
58
7.17. Serpy
08:57
59
8.1. Exercises
03:49
60
8.2. Solution 1
15:22
61
8.3. Solution 2
21:02
62
8.4. Solution 3
17:05
63
9.1. Introduction
02:03
64
9.2. DefaultDict - Lecture
06:34
65
9.3. DefaultDict - Coding
30:47
66
9.4. OrderedDict - Lecture
03:41
67
9.5. OrderedDict - Coding
24:23
68
9.6. OrderedDict and Python 3.6 Dicts
31:45
69
9.7. Counter - Lecture
05:02
70
9.8. Counter - Coding
43:45
71
9.9. ChainMap - Lecture
11:09
72
9.10. ChainMap - Coding
22:45
73
9.11. UserDict - Lecture
05:35
74
9.12. UserDict - Coding
25:39
75
10.1. Exercises
05:36
76
10.2. Solution 1
05:53
77
10.3. Solution 2
04:38
78
10.4. Solution 3
14:30
79
11.1. Python 3.10
25:18
80
11.2. Python 3.9
28:47
81
11.3. Python 3.8 3.7
34:26
82
12.1. The MappingProxy Type
05:52
83
12.2. Marshmallow
33:37

Unlock unlimited learning

Get instant access to all 82 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Books

Read Book Python 3: Deep Dive (Part 3 - Dictionaries, Sets, JSON)

#Title
11.3. Python Deep Dive 3
22.2. Associative Arrays
32.3. Hash Maps
42.4. Python Dictionaries
52.5. Python's hash() Function
63.2. Creating Dictionaries
73.4. Common Operations
83.6. Dictionary Views
93.8. Updating, Merging and Copying
103.10. Custom Classes and Hashes
115.2. Set Theory
125.3. Python Sets
135.4. Creating Sets
145.6. Common Operations
155.8. Set Operations
165.10. Update Operations
175.12. Copying Sets
185.14. Frozen Sets
195.16. Dictionary Views
207.2. Pickling
217.4. JSON Serialization
227.6. Custom JSON Encoding
237.8. JSONEncoder Class
247.10. Custom JSON Decoding
257.12. Using the JSONDecoder Class
269.2. DefaultDict
279.4. OrderedDict
289.7. Counters
299.9. ChainMap
309.11. UserDict

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

PyTorch for Deep Learning with Python Bootcamp

PyTorch for Deep Learning with Python Bootcamp

Sources: udemy
Welcome to the best online course for learning about Deep Learning with Python and PyTorch! PyTorch is an open source deep learning platform that provides a sea
17 hours 2 minutes 14 seconds
The Complete Guide to Django REST Framework and Vue JS

The Complete Guide to Django REST Framework and Vue JS

Sources: udemy
Hi! Welcome to The Complete Guide to Django REST Framework and Vue JS course! In this course you will learn how to create professional REST APIs with Python and Django REST Fram...
13 hours 40 minutes 40 seconds
Mastering OpenAI Python APIs: Unleash ChatGPT and GPT4

Mastering OpenAI Python APIs: Unleash ChatGPT and GPT4

Sources: udemy
Unleash the Power of AI: Master OpenAI's APIs, including GPT-4, DALL-E, and Whisper in this Comprehensive and Hands-On Course. This is a brand new course, recorded with GPT-4! S...
13 hours 4 minutes 58 seconds
Web Developer Bootcamp with Flask and Python in 2022

Web Developer Bootcamp with Flask and Python in 2022

Sources: udemy
Welcome to the Web Developer Bootcamp with Flask and Python! In this course, you'll learn how to build and deploy dynamic websites using Python, Flask, MongoDB,
19 hours 57 minutes 43 seconds
Django for Beginners/APIs/Professionals

Django for Beginners/APIs/Professionals

Sources: leanpub
Django for Professionals Once you have learned the basics of Django there is a massive gap between building simple "toy apps" and what it takes to build a "pro