DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Python - Introduction

DataLab supports two different script languages: DLabPascal and Python. While DLabPascal is dedicated to controlling DataLab and many aspects of data analysis, Python allows you to extend the collection of data analysis tools to the almost unlimited set of ressources develoved by the Python community. Python can be used either by using the built-in Python editor or by executing Python code from within DLabPascal.

In order to be able to use Python from within DataLab you have to install Python and the required libraries on your system. The numerical computing library "NumPy" is required, all other libraries are optional. In general, we recommend the following packages:

Package Description Reference/Manual
Python
REQUIRED
The basic Python installation, see python.org Developer Guide
NumPy
REQUIRED
The fundamental package for scientific computing with Python (numpy.org) Reference Guide
scikit-learn
REQUIRED
The well-known machine learning package for Python (scikit-learn.org) Reference Guide
skops
REQUIRED
A Python library helping you share your scikit-learn based models and put them in production (https://pypi.org/project/skops/) Reference Guide
SciPy Another core package for scientific computing (scipy.org) Reference Guide
Matplotlib Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations (matplotlib.org) Reference Guide
Seaborn Seaborn is a Python visualization library based on matplotlib. It provides a high-level interface for drawing attractive statistical graphics. (matplotlib.org) Reference Guide
pandas A fast, powerful and easy to use data analysis and manipulation tool for Python (https://pandas.pydata.org/) Reference Guide

Once you have installed Python you can install all the other packages by means of pip (a built-in package manager). Simply open a Windows command line window and enter the following commands to install NumPy, skops and the other recommended packages (the path <PYTHONPATH> denotes the directory where Python has been installed):

cd <PYTHONPATH>
python -m pip install numpy
python -m pip install -U scikit-learn
python -m pip install skops
python -m pip install scipy
python -m pip install matplotlib
python -m pip install pandas
python -m pip install seaborn

Please note that you need a connection to the Internet while installing the libraries. Once Python and NumPy have been installed successfully, DataLab will unlock the Python script editor and any command which requires Python as a runtime engine (restart DataLab to enable the changes).

Hint: For the installation of scikit-learn you need to have the MS C++ Build Tools available on your computer. In the case they are not installed, you can get it from here: https://visualstudio.microsoft.com/visual-cpp-build-tools/