Table of contents
The module is like a code library that can be used to borrow code written by somebody else in our Python program. There are two types of modules in Python:
Built-in Modules - These modules are ready to import and use and ship with the Python interpreter. there is no need to install such modules explicitly.
External Modules - These modules are imported from a third-party file or can be installed using a package manager like pip or conda. Since this code is written by someone else, we can install different versions of the same module with time.
The pip command
It can be used as a package manager pip to install a python module. Lets install a module called pandas using the following command
pip install pandas
Using a module in Python (Usage)
import pandas
# Read and work with a file named 'words.csv'
df = pandas.read_csv('words.csv')
print(df) # This will display first few rows from the words.csv file