Mô tả

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, 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.

Bạn sẽ học được gì

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

Yêu cầu

  • 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)

Nội dung khoá học

13 sections

Introduction

3 lectures
Course Overview
12:56
Prerequisites
07:22
Course Slides
00:06

Associative Arrays - Theory!

5 lectures
Introduction
03:24
Associative Arrays
05:40
Hash Maps
24:11
Python Dictionaries
09:38
Python's hash() Function
08:03

Dictionaries

11 lectures
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
Exercises
06:21
Solution 1
04:34
Solution 2
02:04
Solution 3
07:14
Solution 4
05:22

Sets

17 lectures
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
07:46
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
Project 1 - Goals
05:30
Project 1 - Solution
49:37

Serialization and Deserialization

17 lectures
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
JSON Schema
26:06
Marshmallow --> Archived
00:25
PyYaml
18:16
Serpy
08:56

Coding Exercises

4 lectures
Exercises
03:48
Solution 1
15:21
Solution 2
21:01
Solution 3
17:04

Specialized Dictionaries

12 lectures
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
ChainMap - Coding
22:44
UserDict - Lecture
05:34
UserDict - Coding
25:38

Coding Exercises

4 lectures
Exercises
05:34
Solution 1
05:52
Solution 2
04:37
Solution 3
14:29

Python Updates

3 lectures
Python 3.10
25:17
Python 3.9
28:46
Python 3.8 / 3.7
34:25

Extras

1 lectures
The MappingProxy Type
05:51

Archived

1 lectures
Marshmallow
33:36

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.