The Graphics Network

Course Outline - Python

01285 713297

While I do use slides for revision, the key thing about my Python training is it's all hands-on and practical - you learn by doing. I have modules on the Python language as well as its use in data science and machine Learning. These can be given individually or in combination, and a popular choice is to split a 5 day course into separate weeks, for example 3 days on the language followed by 2 days on using Python for data.

The Python Language

About Python
Why Python was invented. What Python is good for (and what it's not). History and versions. Development tools. Virtual environments.
Getting Started
Scripts vs programs. A simple Python script. Running a program. The interactive interpreter. Layout and white space. Storing scripts. Python 'variables' and names. How typing works in Python. Some of Python's types. Type conversion. Python's operators.
Control Flow
if, else and elif. Interval comparisons. for, sequences and ranges. break, continue and pass. Iterating through strings and collections. while loops. Implementing menus.
Lists - Python's smart arrays. Dictionaries - Python's ubiquitous collection. Tuples - Python's most used but often misunderstood collection. List and dictionary comprehensions. Generators and coroutines. The other collections.
The purpose of functions. Writing and calling functions. Passing arguments. Named (keyword) arguments. Optional (default) arguments. Local and global variables. The main function and __name__. Modules and packages. Writing and using modules. Import options. Lambdas. Recursion and closures.
Files and Strings
Opening files for read, write and append. Reading and writing. Using 'with'. Text and binary files. Using delimited text files for data. Error and exception handling. Formatting strings. Splitting strings. Slicing strings.
Object-oriented Python
Object-oriented programming and its benefits. Components, classes and objects. Defining a class and creating objects. Initialization and the __init__ method. 'Private' fields. Functions, methods and attributes. Object collections. Treating objects as strings. Implementing standard operators. Decorators. Read-only and read-write properties. Inheritance. 'Duck typing' and polymorphism.
Multitasking concepts. Threads, processes and processors. Creating and communicating with a process. Creating and starting a thread. Thread limitations and the process solution. Queues and shared arrays. The concurrent.futures module. Thread and process pool executors.
Networking concepts. TCP/IP. Sockets. A Python client. A Python server. Supporting many clients.
Unit Testing
The importance of testing. DocTest. Unit testing and Test Driven Development. Writing tests. Running tests and fixing problems.
How databases work, and how Python interacts with them. SQLite, MySQL and others. Connections and cursors. Querying and manipulating data.
Optional - Introducing Graphical User Interfaces
Tkinter and its alternatives. Creating a GUI. Basic controls. Event handling.

Python for Data Science

Python tools
Data analysis. IPython and Jupyter. SQLAlchemy. The SciPy family. Anaconda and Miniconda.
DataFrames. Loading and storing data. Grouping, merging and joining. Slicing and indexing. Time and date manipulation. Hierarchies and multi-dimensional data.
ndarray - the multi-dimensional array. Manipulation without using 'for'. Shapes and axes. Splitting and stacking. Indexing and slicing. Universal functions. Shallow and deep copies and views. Broadcasting.
Plotting and charting
Matplotlib and pyplot. Basic charts. Colours and appearance. Using charts for analysis. Integration with pandas and NumPy.
Machine learning
What machine learning means. Training and test data. Clustering, classification and regression. Sci-kit learn. Big data examples.