Installing in Python
pip install scikit-learn
pip install seaborn
pip install mglearn
pip install matplotlib
pip install numpy
python –version
–no-warn-script-location
python -m venv myenv
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
myenv\Scripts\activate
: To activate myenv environment.
deactivate
: To deactivate
python linear_regression.py
: Command to execute any file.
Python Info
# This is a comment.
Date.ToText([Date], “yy”)
”’
This is a multiline comment in Python.
It can span multiple lines and is often used for documentation purposes.
”’
x = 5
# Above is a variable declaration.
# Variables are case-sensitive.
# Type casting of variables.
int
str
float
Function type returns the data type. e.g.
x = 5
print(type(x))
Above will return
<class ‘int’>