PyHacks is a tutorial repo managed by Gary Hutson from hutsons-hacks.info. This has been created to enable people to get up to speed quickly and to enable people to learn from my pain of learning Python about 4 years ago. This will act as a support to my YouTube tutorials.
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 - 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.
- 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.
- COMING SOON
The supporting YouTube videos are available for the code chunks:
-
Lists
- 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).
-
Classes:
- 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.