Python 3: Deep Dive (Part 3 - Hash Maps)
4.9 (415 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
10,021 students enrolled

Python 3: Deep Dive (Part 3 - Hash Maps)

Dictionaries, Sets, and Related Data Structures
Highest Rated
4.9 (415 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
10,021 students enrolled
Created by Fred Baptiste
Last updated 8/2019
English
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 20.5 hours on-demand video
  • 72 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
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
Course content
Expand all 79 lectures 20:22:29
+ Associative Arrays - Theory!
5 lectures 50:56
Associative Arrays
05:40
Hash Maps
24:11
Python Dictionaries
09:38
Python's hash() Function
08:03
+ Dictionaries
11 lectures 03:40:43
Introduction
01:13
Creating Dictionaries - Lecture
13:08
Creating Dictionaries - Coding
24:01
Common Operations - Lecture
08:11
Common Operations - Coding
32:43
Dictionary Views - Lecture
10:41
Dictionary Views - Coding
30:12
Updating, Merging, and Copying - Lecture
12:20
Updating, Merging, and Copying - Coding
33:55
Custom Classes and Hashing - Lecture
20:25
Custom Classes and Hashing - Coding
33:54
+ Coding Exercises
5 lectures 25:35
Exercises
06:21
Solution 1
04:34
Solution 2
02:04
Solution 3
07:14
Solution 4
05:22
+ Sets
17 lectures 03:16:26
Introduction
01:55
Basic Set Theory
12:35
Python Sets
08:58
Creating Sets - Lecture
03:40
Creating Sets - Coding
14:45
Common Operations - Lecture
03:12
Common Operations - Coding
15:17
Set Operations - Lecture
08:00
Set Operations - Coding
20:30
Update Operations - Lecture
06:08
Update Operations - Coding
21:07
Copying Sets - Lecture
01:13
Copying Sets - Coding
08:10
Frozen Sets - Lecture
06:54
Frozen Sets - Coding
26:37
Dictionary Views - Lecture
09:27
Dictionary Views - Coding
27:58
+ Project 1
2 lectures 55:07
Project 1 - Goals
05:30
Project 1 - Solution
49:37
+ Serialization and Deserialization
17 lectures 05:52:42
Introduction
04:29
Pickling - Lecture
05:57
Pickling - Coding
28:47
JSON Serialization - Lecture
07:22
JSON Serialization - Coding
22:29
Custom JSON Encoding - Lecture
02:30
Custom JSON Encoding - Coding
37:36
Using JSONEncoder - Lecture
11:36
Using JSONEncoder - Coding
34:00
Custom JSON Decoding - Lecture
16:35
Custom JSON Decoding - Coding
51:58
Using JSONDecoder - Lecture
01:29
Using JSONDecoder - Coding
41:00
Marshmallow
33:36
PyYaml
18:16
Serpy
08:56
+ Coding Exercises
4 lectures 57:14
Exercises
03:48
Solution 1
15:21
Solution 2
21:01
Solution 3
17:04
+ Specialized Dictionaries
12 lectures 03:32:56
Introduction
02:02
DefaultDict - Lecture
06:33
DefaultDict - Coding
30:46
OrderedDict - Lecture
03:40
OrderedDict - Coding
24:22
OrderedDict and Python 3.6 Dicts
31:44
Counter - Lecture
05:01
Counter - Coding
43:44
ChainMap - Lecture
11:08
UserDict - Lecture
05:34
UserDict - Coding
25:38
+ Coding Exercises
4 lectures 30:32
Exercises
05:34
Solution 1
05:52
Solution 2
04:37
Solution 3
14:29
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)
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.

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


***** Prerequisites *****

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.

Who this course is for:
  • Python developers who want a deeper understanding of Python dictionaries and related topics