/learn-modern-python

Primary LanguageJupyter NotebookMIT LicenseMIT

Learn Modern Python for Data Analysis

This course is part of the GenAI, Web 3, and Metaverse Program

After completing this course, move on to the Learn Generative AI Repo

Class Recordings

Recorded Classes YouTube Playlist

Note:

Each Class Notebook contains a reference to the Class Recording Video Link

What is Modern Python?

Modern Python: New Features, Better Code

Modern Good Practices for Python Development

Python's type system explained: Static vs dynamic typing

Type Hints should be used by Professional Developers

Type hints are the biggest change in the history of Python since the unification of types and classes in Python 2.2, released in 2001. However, type hints do not benefit all Python users equally. That’s why they should always be optional.

The goal of Type Hints is to help developer tools find bugs in Python codebases via static analysis, i.e., without actually running the code through tests. The main beneficiaries are professional software engineers using IDEs (Integrated Development Environments) and CI (Continuous Integration). The cost-benefit analysis that makes type hints attractive to this group does not apply to all users of Python. However, we are professional developers, therefore it is beneficial for us to adopt type hints. This Modern Python course uses Type Hints extensively.

Installation

Install Anaconda with Python 3.12

Install VS Code

Install Python Plugin

Read this Document for Reference

Commands to Upgrade to Latest Python 3.12 in Anaconda

conda create --name myenv3_12 python=3.12
conda env list
conda activate myenv3_12
python --version

Text Books

  1. Python Crash Course 3rd Edition
  2. Chapter 5 of Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter 3rd Edition

Reference Book

Fluent Python: Clear, Concise, and Effective Programming 2nd Edition

Important Note:

Chapters 8 and 15 have detailed discussions on the latest typing functionality, however, the book doesn't mention that as of Python 3.9, type aliases like List, Tuple, Dict, ... are deprecated.

So, we should use the built-in types list, tuple, dict, ...

Using List/Tuple/etc. from typing vs directly referring type as list/tuple/etc

Projects

Comprehensive Data Analysis with Pandas

Pandas Project: Make a Gradebook With Python & Pandas

Fundamentals of Modern Python and Data Analysis Quiz

Learning Material: All the Material Covered in this Course i.e. this repo

Total Questions: 40

Duration: 60 minutes