/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

Live Zoom Classes: Data Science and Modern Python Crash Course for WMD Q1, Q2, and Q3

Days: Monday, Tuesday, Thursday, Friday, Saturday, and Sunday

Time: 08:00 PM to 10:00 PM

Join Zoom Meeting

https://us06web.zoom.us/j/82224691502?pwd=6Mq6Wt09uUkVLme859duUYP1Efww4K.1

Meeting ID: 822 2469 1502

Passcode: 936542

This session will also be live streamed on YouTube:

https://www.youtube.com/@panaverse/streams

What is Modern Python?

Modern Python: New Features, Better Code

Modern Good Practices for Python Development

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

Learning Material

We will cover Python version 3.12+ with Latest Features

  1. Chapters 1-10 of Python Crash Course 3rd Edition

Update the Book Code with Type Hints Resources for Python Crash Course

Google Colaboratory

  1. How to Determine the Type of an Object in Python?

  2. Python end parameter in print()

  3. Typing

https://docs.python.org/3/library/typing.html

https://www.javatpoint.com/type-hint-concepts-to-improve-python-code

Note: The last article is not current because it does not use collections.abc

Typing Cheat Sheet

  1. Abstract Base Classes (collections.abc)

https://www.youtube.com/watch?v=oUt1feRoyvI

https://docs.python.org/3/library/collections.abc.html

  1. Yield in Python

https://www.simplilearn.com/tutorials/python-tutorial/yield-in-python

https://stackoverflow.com/questions/74774919/proper-typing-for-a-interesting-yield-function

Example of type hint for a function returning yield i.e. generator function:

First Import:

from collections.abc import Iterator

Then define the function that returns yield:

def my_generator()-> Iterator[int]:
    function statements
  1. Advanced Classes Topics in Python

Class Attributes and Methods vs Instance Attributes and Methods in Python

https://www.tutorialsteacher.com/articles/class-attributes-vs-instance-attributes-in-python

https://www.digitalocean.com/community/tutorials/python-static-method

Public, Protected, Private Members

https://www.tutorialsteacher.com/python/public-private-protected-modifiers

https://www.linkedin.com/pulse/pythons-access-specifiers-public-protected-private-swarooprani-manoor/

How To Use the str() and repr() Methods in Python:

https://www.digitalocean.com/community/tutorials/python-str-repr-functions

Duck Typing:

https://ioflood.com/blog/duck-typing/

Type Statements:

https://docs.python.org/3.12/reference/simple_stmts.html#the-type-statement

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

Additional Readings:

https://towardsdatascience.com/python-type-hinting-duck-type-compatibility-and-consistent-with-72e8b348d8ac

Projects

Comprehensive Data Analysis with Pandas

Pandas Project: Make a Gradebook With Python & Pandas

Fundamentals of Modern Python for Data Analysis Quiz

Total Questions: 40

Duration: 60 minutes