Duration
5 days
Overview
Initially Guido van Rossum's 1989 holiday project, Python has grown into an amazing computer language. It's a joy to learn and read, and powerful enough to handle everything from low-level system resources to advanced applications like deep learning. Elegantly simple and complete, it also boasts a massive ecosystem of libraries and frameworks. Python programmers are in high demand; you can't afford not to be fluent!
Course Prerequisite
Knowledge and experiences working with basic python programming is required.
Day 1
9:00am-10:30am
PART 1 - STARTING OUT
(Point 1-10 quick summary)
- 1. About Python
a. Why should I use Python?
- b. What Python does well
- c. What Python doesn’t do as well
- d. Why learn python 3?
10:30am-10:45am Morning break
10:45am-12:30pm
- 2. Getting started
- a. Installing Python
- b. Basic Interactive mode and IDLE
- c. Using IDLE’s Python shell window
- d. Using interactive prompt to explore Python
12:30pm-1:30pm Lunch
1:30pm-3:30pm
- 3. The Quick Python overviews
- a. Python synopsis
- b. Built-in data types
- c. Control flow structures
- d. Module creation
- e. Object-oriented programming
PART 2 - THE ESSENTIALS
3:30pm-3:45pm Afternoon break
3:45pm-5:00pm
- 4. The absolute basics
- a. Indentation and block structuring
- b. Differentiating comments
- c. Variables and assignments
- d. Expressions
- e. Strings
- f. Numbers
- g. The None value
- h. Getting input from the user
- i. Built-in operators
- j. Basic Python style
- 5. Lists, tuples, and sets
- a. Lists are like arrays
- b. List indices
- c. Modifying lists
- d. Sorting lists
- e. Other common list operations
- f. Nested list and deep copies
- g. Tuples
- h. Sets
Day 2
9:00am-10:30am
- 6. Strings
- a. Strings as sequences of characters
- b. Basic string operations
- c. Special characters and escape sequences
- d. String methods
- e. Converting from objects to strings
- f. Using the format method
- g. Formatting strings with %
- h. String interpolation
- i. Bytes
10:30am-10:45am Morning break
10:45am-12:30pm
- 7. Dictionaries
- a. What is a dictionary?
- b. Other dictionary operations
- c. Word counting
- d. What can be used as a key?
- e. Sparse matrices
- f. Dictionaries as caches
- g. Efficiency of dictionaries
12:30pm-1:30pm Lunch
1:30pm-3:30pm
- 8. Control flow
- a. The while loop
- b. The if-elsif-else statement
- c. The for loop
- d. List and dictionary comprehensions
- e. Statements, blocks, and indentation
- f. Boolean values and expressions
- g. Writing a simple program to analyze a text file
- 9. Functions
- a. Basic function definitions
- b. Function parameter options
- c. Mutable objects as arguments
- d. Local, nonlocal, and global variables
- e. Assigning functions to variables
- f. Lambda expressions
- g. Generator functions
- h. decorators
3:30pm-3:45pm Afternoon break
3:45pm-5:00pm
- 10. Modules and scoping rules
- a. What is a module?
- b. A first module
- c. The import statement
- d. The module search path
- e. Private names in modules
- f. Library and third-party modules
- g. Python scoping rules and namespaces (Point 11-14 in details)
Day 3
9:00am-10:30am
- 11. Python programs
- a. Creating a very basic program
- b. Making a script directly executable on UNIX
- c. Scripts on macOS
- d. Script execution options on Windows
- e. Programs and modules
- f. Distributing Python applications
10:30am-10:45am Morning break
10:45am-12:30pm
- 12. Using the filesystem
- a. os and os.path vs pathlib
- b. Paths and pathnames
- c. Getting information about files
- d. More filesystem operations
- e. Processing all files in a directory subtree
12:30pm-1:30pm Lunch
1:30pm-3:30pm
- 13. Reading and writing files
- a. Opening files and file objects
- b. Closing files
- c. Opening files in write or other modes
- d. Functions to read and write text or binary data
- e. Reading and writing with pathlib
- f. Screen input/output and redirection
- g. Reading structured binary data with the struct module
- h. Pickling object files
- i. Shelving objects
3:30pm-3:45pm Afternoon break
3:45pm-5:00pm
- 14. Exceptions
- a. Introduction to exceptions
- b. Exceptions in Python
- c. Context managers using the with keyword
Day 4
9:00am-10:30am
PART 3 - ADVANCED LANGUAGE FEATURES
- 1. Classes and object-oriented programming
- a. Defining classes
- b. Instance variables
- c. Methods
- d. Class variables
- e. Static methods and class methods
- f. Inheritance
- g. Inheritance with class and instance variables
- h. Recap: Basics of Python classes
- i. Private variables and private methods
- j. Using @property for more flexible instance variables
- k. Scoping rules and namespaces for class instances
- l. Destructors and memory management
- m. Multiple inheritance
10:30am-10:45am Morning break
10:45am-12:30pm
- 2. Regular expressions
- a. What is a regular expressions?
- b. Regular expressions with special characters
- c. Regular expressions and raw strings
- d. Extracting matched text from string
- e. Substituting text with regular expressions
12:30pm-1:30pm Lunch
1:30pm-3:30pm
- 3. Data types as objects
- a. Types are objects, too
- b. Using types
- c. Types and user-defined classes
- d. Duck typing
- e. What is a special method attribute?
- f. Making an object behave like a list
- g. The getitem special method attribute
- h. Giving an object full list capability
- i. Subclassing from built-in types
- j. What to use special method attributes
3:30pm-3:45pm Afternoon break
3:45pm-5:00pm
- 4. Packages
- a. What is a package?
- b. A first example
- c. A concrete example
- d. The all attribute
- e. Proper use of packages
- 5. Using Python libraries
- a. “Batteries included”: The standard library
- b. Moving beyond the standard library
- c. Adding more Python libraries
- d. Installing Python libraries using pip and venv
- e. Pypi (aka “The Cheese Shop”)
Day 5
9:00am-10:30am
PART 4 - WORKING WITH DATA
- 6. Basic file wrangling
a. The problem: The never-ending flow of data files
b. Scenario: The product feed from hell
c. More organization
d. Saving storage space: Compression and grooming
10:30am-10:45am Morning break
10:45am-12:30pm
- 7. Processing data files
a. Welcome to ETL
b. Reading text files
c. Excel files
d. Data cleaning
e. Writing data files
12:30pm-1:30pm Lunch
1:30pm-3:30pm
- 8. Data over the network
a. Fetching files
b. Fetching data via an API
c. Structured data formats
d. Scraping web data
3:30pm-3:45pm Afternoon break
3:45pm-5:00pm
- 9. Saving data
a. Relational databases
b. SQLite: Using the sqlite3 database
c. Using MySQL, PostgreSQL, and other relational
d. Making database handling easier with and ORM
e. NoSQL databases
f. key:value stores with Redis
g. Documents in MongoDB
- 10. Exploring data
a. Python tools for data exploration
b. Jupyter notebook
c. Python and pandas
d. Data cleaning
e. Data aggregation and manipulation
f. Plotting data
g. Why you might not want to use pandas
Programme scope, delivery arrangements and suitability are confirmed during enquiry.