Frequently Used External Packages in Python
An external package
refers to a library developed externally to enhance programming convenience.
You can install external packages using Python's own package management system, pip
.
Installing External Packages with pip
$ pip install requests # Install the requests package for making network requests
Frequently Used External Packages
-
requests
- A library for making HTTP requests. It is often used for web scraping and API calls.
-
numpy
- A library for high-performance numerical computations. It efficiently handles multi-dimensional arrays and is widely used in scientific and engineering calculations.
-
pandas
- A library for data analysis and manipulation, offering a variety of functionalities to efficiently manage structured data. It makes it easy to handle various data formats with a focus on data frames (DataFrame).
-
matplotlib
- A library for creating 2D graphics and plots. It is mainly used for data visualization.
-
scikit-learn
- A library providing machine learning algorithms. It is used for tasks like classification, regression, and clustering.
-
flask, django
- Frameworks for developing web applications. Flask is suitable for simple and lightweight web app development, while Django is more powerful and feature-rich for robust web app development.
-
Beautiful Soup
- A library for extracting data from HTML and XML files, mainly used for web scraping.
External Package Usage Example
Example Using the requests Package
# Fetching the content of a web page using the requests package import requests # Import the requests package response = requests.get('https://example.com') # Send a request to the URL and receive a response print(response.text) # Print the response content
Lecture
AI Tutor
Publish
Design
Upload
Notes
Favorites
Help