Python Object Orientated Programming (Spyder 5 IDE)
This video is an overview of the inbuilt Python programming language and will focus on the concepts of Object Orientated Programming (OOP). Before looking at this video you should have installed the Anaconda Python distribution and made yourself comfortable with Python Procedural Programming and Python Code Blocks which are covered in my earlier tutorial videos and written guides linked below.
Written Guides:
https://dellwindowsreinstallationguide.com/python/
Python Playlist:
https://www.youtube.com/playlist?list=PL1RkaknDn7v-EO4V38oDBkZNd6_530nan
We will start by creating two script files and importing objects from one script file to another using:
from module import object
Or:
import module
module.object
This dot syntax is the same syntax used to access methods and attributes from a class. We use this and build upon the knowledge gained in the previous video on code blocks to look at defining out own class and use the Spyder 5 debugger to understand how code in a class works. We then look into the concept of inheritance. This forms the basis behind object orientated programming.
Finally now that we understand the fundamentals of Python, we can look at the use of the builtin modules and the standard modules. We can import and use objects from these modules or packages using the same syntax we used earlier to import objects from one of our own script files. We have a brief look at installing a package using Anaconda.
00:00:45 Python script files (modules)
00:02:04 from module import object
00:03:35 objects: variables and functions
00:05:20 from module import object1, object2, …
00:06:15 from module import * (all)
00:08:58 import module and module.object
00:10:40 import module as alias
00:11:20 class attributes and methods
00:12:58 creating a custom class
00:15:00 __init__ initialization (of attributes) datamodel method
00:21:57 accessing a method within a class
00:26:00 get and set methods
00:28:37 __repr__ and __str__ datamodel methods
00:32:10 mathematical operators
00:38:40 inheritance
00:41:40 accessing a superclass datamodel method
00:49:51 importing a class from another module
00:51:16 builtin module
00:51:53 sys module and appending a location to the sys path
00:54:47 math module
00:56:05 time module
00:57:20 Python module index: standard modules
00:58:02 random module
01:01:25 keyword module
01:02:35 fractions module
01:03:45 statistics module
01:04:49 datetime module
01:06:06 Python packages
01:08:23 data science packages
01:09:22 additional packages
Once you have understood the above you should be able to move onto the data science libraries such as numpy, pandas and matplotlib covered in my other tutorial videos.
#python #spyder5 #programming