Lecture
Importing External Modules
So far, you’ve worked with Python’s built-in modules such as math, random, and datetime.
Beyond these, Python offers a vast ecosystem of external modules developed by the community.
External Modules
External modules are libraries that are not part of Python’s standard library.
Key characteristics include:
- Extending Python’s capabilities for tasks like web scraping, data analysis, visualization, and machine learning
- Being published on the Python Package Index (PyPI)
- Installable via the package manager
pip
You’ll use them whenever you need functionality that isn’t built into Python by default.
Examples
Examples of popular external modules include:
requests— sending HTTP requestsopenpyxl— working with Excel filespandas— performing data analysismatplotlib— creating visualizations
Instead of building everything from scratch, you can import and reuse these modules — saving time and reducing errors.
Lessons in this chapter · Python Programming Review
- 1. Variables and Data Types
- 2. Expressions and Arithmetic
- 3. String Operations
- 4. Lists in Python
- 5. List Methods and Slicing
- 6. Tuples and Sets
- 7. Dictionaries - Keys and Values
- 8. Dictionary Methods and Nesting
- 9. Conditional Statements (if, elif, else)
- 10. Loops - for and while
- 11. Control Flow & Data Structures Recap
- 12. Multiple-choice quiz
- 13. Loop Controls (break, continue, pass)
- 14. Functions - Defining and Calling
- 15. Function Arguments and Return Values
- 16. Variable Scope and Nested Functions
- 17. Exception Handling with try/except
- 18. File Reading and Writing
- 19. CSV File Parsing
- 20. Using Built-in Modules (math, random, datetime)
- 21. Importing External Modules
- 22. Fill-in-the-blank quiz
Quiz
0 / 1
What tool do you use to install external Python modules?
Python external modules can be installed using .
npm
pip
brew
apt
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help