Learn Python by building a Spotify log analysis tool
  • Get experience with Python's object-oriented programming constructs
  • Write your own unit tested packages which can be used across projects
  • Learn to quickly extract insights with the Pandas data analysis library

The exercises are interspersed with a project developing a data analysis tool. This project will illustrate how the Python skills you've acquired enable you to implement sophisticated functionality as a maintainable package.

DEMO PROJECT

A student completing this course will be able to implement Python scripts, modules and packages using classes and unit tests. They will also have experience using the Pandas data analysis library.

This is demonstrated through the implementation of a command-line data analysis tool.

This course only assumes the learner is capable of working on the Bash command-line interface via ssh, and experience with another programming language such as C, C++, Java, PHP, Visual Basic, Perl, or Ruby.

Python's use of indentation; type checking and the scalar data types; f-strings and interpolation; types of equality; polymorphism and operator overloading; and Python's OO core.
Looping over lists, tuples, sets, and dictionaries; combining and unpacking lists using the + and * operators; shallow and deep copies of data; list comprehension for data transformation; iterators and iterables; sorting; and the match/case control flow.
Positional and keyword arguments; variadic functions; variable scope and the LEGB rule; nonlocal and global variables; lambda functions; and function decrorators.
The difference between an iterable and an iterator; list comprehensions vs generator expressions; transforming and processing data with generator expressions, list comprehension, map, filter and reduce; generators and yield; and an introduction to the itertools package.
Class creation and inheritance; __bool__, __str__, __repr__ and eval; @property, @classmethod, and @staticmethod decorators; sortable and iterable objects; multiple inheritance and the method resolution order (MRO); inheritance and attribute name mangling; mixins vs inheritance; and metaclass and the Abstract Base Class.
Regular expression search and replace; filehandles and exception handling; reading, writing, parsing ahd validating CSVs; and Pandas - Series, DataFrames, GroupBy aggregation, transformation and filtering.
Scripts, modules, packages, and namespace packages; argparse CLI library; debugging with assert; unit and lint testing; and a final project using all the concepts covered.