I had an aim at the start of this year to make learning Python accessible to everyone, for free. Unfortunately, I had some health problems to contend with alongside work, so I did not have the extracurricular time to tend to my pet project.
However, I have been busy over the last few evenings and have managed to build a good repository of material, still being added to as we speak.
What does the repository contain?
The code examples and snippets for the repository are below. All I ask is you star my GitHub account and have fun learning.
Python Basics, Programming and OOP
The list below shows all the current files for getting up to speed with Python quickly:
- Lists – Python’s main data type
- Tuples – Python’s immutable type (cannot be changed)
- Dictionaries – dictionaries allow for the storage of multiple types in one place. These are essentially the drivers for Panda’s data frames. The difference between a dictionary and the other types is that it does not allow multiple of the same keys. Therefore, only unique keys can be allocated.
- Sets – Sets are the final type of data structure used in Python
- Conditional Logic – learn how to if else like the best of them
- Going Loopy – All Things While and For Loop – learn about iteration and how to loop over Python objects
- Functions – create your own user defined functions
- Lambda Functions – learn the power of anonymous functions in Python
- Classes and Class Methods – create your first class and learn about class methods
- Classes with getters and setters – explore the concept of class getters and setters to read and edit properties in Python, albeit there is no concept of hiding variables like other OOP
- Inheritance and Transformers Classes – learn how you can use cool features from a class and reduce the number of line typed by inheriting features from the base class
- Creating your own Iterators – create your own iterators to enable custom iteration
- Function Scope – Local vs Global – learn about local and global scope
- Working with Dates – work with dates in Python
- Parsing JSON – Learn how to work with JSON objects from websites and parse them in Python with the json library
- Mathematics aka the Math Library – get comfortable with the math package
- Regex – Regular Expressions – the weird world of text formatting with regex and strings
- Error Handling – try.except.finally – learn how to allow your programmes to fail gracefully!
- User Input and Replacement String Formatting – understand user input and string replacement
- File Input and Output – work with the operating system to create, write files, make and delete folders, get system attributes and learn how to create a machine shutdown function (do not change the != or it will shutdown your system when it runs).
Pandas – DataFrames and Series
- Pandas – Getting started – starts your slowly.
- Working with Pandas Series – 1d series objects – used a lot with time series data.
- DataFrames – indexing and creation – DataFrames – creating, indexing and extracting elements.
- DataFrames – Cleaning Data – teaches you how to remove duplicates, replace values, dummy encode, mean imputation, etc.
Data Visualisation – Matplotlib
- Intro to Matplotlib – this provides an intro to creating charts and basic formatting.
- Line Chart Creation – this takes you through line chart creation and tweaking the settings, such as line titles, colouration, fonts, etc.
- Labelling and grid lines – shows how to add labels and work with the grid lines on the plot.
- Creating subplots – learn how to create subplots.
- Scatter Chart creation – learn how to visualise correlations and work with scatter charts.
Are there supporting YouTube videos? You bet!
I have managed to record quite a few tutorials, but this is the most time consuming part of the process. See a list of the ones I have available on YouTube at present:
- List and List Operations – shows how to build, add and work with lists
- List Looping and List Comprehension – shows how to iterate through a list and build list from lists aka the famous list comprehensions
- Sorting, Grouping and Joining Lists – this shows how to sort lists, create copies via various methods and joining lists.
- Tuples – this shows you how to index, work with, add to (why would you need to) and loop through tuples.
- Dictionaries – one of the most utilised Python data structures and this knowledge will stand you in good stead for understanding how Pandas data frames work.
- Sets – this teaches you what you need to know about sets, the final Python data structure.
- Conditional Logic – learn how to construct IF..ELIF..ELSE statements in Python.
- Looping and Iteration – Looping and iteration – understand more about looping.
- Function Creation – create functions, learn about Lambda functions, learn how to capture multiple arguments (args) and learn how to work with keyword arguments (kwargs).
- Creating Transformers game with Classes and Class Methods – shows how to create your first class and then create a game with class methods – a method is something that performs an actions, examples would be printing to the console, writing a file to disk, creating a folder, inflicting damage in battle, etc.
I am particularly proud of the classes game:
This is a work in progress
Please note this is a work in progress and the best way to stay up to date with the new additions is to a) subscribe to my YouTube channel; b) keep abreast of the updates on the website and c) star and watch the associated repository: https://github.com/StatsGary/PyHacks-Tutorials.
Call for ideas
If there is anything you are dying to see in the repository, and I have not included it, then please let me know by carrier pigeon:
Signing off and remember: