Table of contents
Modules in Python:
A module can contain executable statements as well as function definitions. It is like a 'code library' - used to borrow code written by someone else in Python.
To Import Any Module - We use 'import' command.
Types of Modules:
There are two types of modules:
Built-in modules - they are already built-in in python such as: math, numpy, os.
External modules - they need to be downloaded externally such as: pandas, sklearn, tensorFlow.
Pip in Python:
PIP is a package manager for Python packages, or modules.
To Install Module Externally - We use pip command.
pip install module_name
REPL:
REPL stands for Read, Evaluate, Print, Loop. The REPL is how you interact with the Python Interpreter. Unlike running a file containing Python code, in the REPL you can type commands and instantly see the output printed out.
NOTE: It is a website where you can run your python program. CodingSplash
First Program:
The print command - prints the input as is it is. It executes the result line by line.
print("Hello World", 7)
print(5)
print("Bye")
print(17*13)
Output:
Hello World 7
5
Bye
221
Some Key Points:
To read excel files - we use read_csv function.
sklearn - is library of machine learning.
<< Previously -------------------------------------------------- Next Lesson >>