From the course: Complete Guide to Python for Data Engineering: From Beginner to Advanced
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Modules and packages - Python Tutorial
From the course: Complete Guide to Python for Data Engineering: From Beginner to Advanced
Modules and packages
- [Instructor] Imagine you are assembling a car. You could create every part from a scratch, or you could use pre-made parts to speed up the process. In Python, modules and packages are like these pre-made parts, reusable pieces of code that make your program more efficient and manageable. Let's understand modules and packages in Python. Starting with the modules, a module in a Python is a file containing Python code. This code can define functions, classes, and variables. It's like a toolbox that we can dip into whenever we need a specific tools. To use a module, we need to import it in our program. It's like opening the toolbox so we can use the tools inside. Let's import our first module in Python, and see how it works. For that, let's go to our Google workbook. Click on this file, and let's have another file. I give it a name, "ModulesAndPackage". To import a module, type a keyword, "import", and then your module…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Introduction to Python and data engineering3m 6s
-
Setting up your Python environment3m 9s
-
Explore the Google Colab worksheet4m 26s
-
Variables and data types5m 19s
-
Operators and expressions7m 7s
-
(Locked)
Control structures6m 58s
-
(Locked)
Functions6m 45s
-
(Locked)
Modules and packages5m 9s
-
(Locked)
String manipulation8m 12s
-
(Locked)
Error handling5m 25s
-
(Locked)
Solution: Conditions1m 18s
-
-
-
-
-
-
-
-
-
-
-
-