Learn Python by building a Spotify log analysis tool

On completion of the exercises in this course, you will have:

  • Fluency in Python's idiomatic object-oriented coding style
  • Familiarity with Python's syntax, control structures, generators, decorators, and metaclasses
  • Proficieny utilizing Pandas and other critical data-handling tools such as regular expressions
  • Patterns for writing testable and maintainable code
  • Tools and techniques for debugging, understanding and refactoring existing codebases

The exercises are interspersed with a project to develop a data analysis tool, demonstrating how the Python skills you have acquired can be used to implement sophisticated functionality in 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 assumes experience in software development, object-oriented programming, and the Bash command line via SSH.

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; 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; Python virtual environments; and a final project using all the concepts covered.