Datascience team
Python is a General Purpose Language(GPL) born February 1991. In the 2010s Python became popular, driven by the growing popularity of data science.
R is a Domain-Specific language (DSL) for data analysis and visualization.
x = 5
print(f"type of x is: {type(x)}")
# type of x is int
x = "hello"
print(f"type of x is: {type(x)}")
# type of x is str
⏩ Go back
# python function checks operator types
1 + "2" # ❌ TypeError: unsupported operand types (int + str)
# but some type is allowed
1 + True # ✅ 2 (True → 1)
3 * "a" # ✅ "aaa"
⏩ Go back
A Python Interpreter is :
Python Virtual Environment is an isolated workspace that contains its own Python interpreter and dependencies.
Package management in Python refers to the system that handles:
IDE for python:
An IDE is a software application that provides a complete set of tools for writing, debugging, testing, and deploying code faster in a single interface.
Python project structure and configuration files
Python in CASD
SOP for creating python project in CASD
Standard packages are native in python Interpreter!
pip install sys
This command will fail, because sys is a standard package,it's already in the python environment. We can use the standard package directly.
import sys
Users need to activate the CASD PyPi server, before running the below command
pip install pandas
CASD PyPi server does not have all the packages in the official PyPi repo. You can check package availabilities with the below commands :
pip install package-name --dry-run
or
pip index versions package-name
Contact service@casd.eu, if the required package is not available
By default, vscode does not have the required plugins for python development.
CASD provides a list of vscode plugins for python development:
Go to the TP2: basic_python_syntax
Python provides thousands of packages for data science. Below are some most popular packages