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

Data Analysis for Beginners: Python & Statistics

Data Analysis for Beginners: Python & Statistics

Sources: zerotomastery.io
This course is your first step into the world of data analysis using one of the main tools for analysts - Python. Without complicated terms, advanced...
6 hours 34 minutes 20 seconds
The Complete Python Programming Course for Beginners

The Complete Python Programming Course for Beginners

Sources: codewithmosh (Mosh Hamedani)
Python is the most popular programming language in the world. It's used by big companies like Google, Facebook, Dropbox, Reddit, Spotify, Quora, etc. Mathematicians, scientists,...
11 hours 56 minutes 40 seconds
The Ultimate Django Series: Part 2

The Ultimate Django Series: Part 2

Sources: codewithmosh (Mosh Hamedani)
Do you want to take your Django skills to the next level and become that professional back-end developer that companies love to hire? This is exactly the course you need.
5 hours 41 minutes 6 seconds
[Full Stack] Airbnb Clone Coding

[Full Stack] Airbnb Clone Coding

Sources: Nomad Coders
In this series, we make an AirBnb clone. We will develop a complete stack that runs the entire loop, including front + back + distribution. As a result, after this course you wi...
29 hours 47 minutes 6 seconds
The Fundamentals of Programming with Python

The Fundamentals of Programming with Python

Sources: techwithtim.net (Tim Ruscica)
Learn the Python programming language from scratch. This series is designed for complete beginners and will walk you through the python programming language. Ab
4 hours 18 minutes 50 seconds