Search⌘ K
AI Features

Python Kernel

Explore how to create and run Python Notebooks in Azure Data Studio using the Python 3 Kernel. Understand running code cells, managing Python versions, and using notebooks for versatile data tasks including scripting, analysis, and file system queries. This lesson helps you get started with Python notebooks to enhance your data projects in Azure Data Studio.

Simple Python Notebook

Python is right at home as an official Kernel option and is, in fact, one of the core Notebook languages, where the Project Jupyter name is derived: (Julia, Python, and R). Python is also used “behind the scenes” when running a Notebook based on the PowerShell Kernel.

To get started, create a new notebook in Azure Data Studio (File, New Notebook), and select the “Python 3” Kernel, as shown below:

Next, create a text cell with the following markdown:

Markdown
# Python Notebook
## Platform Information

This is followed by a code cell with the following Python script:

Python
import os
import platform
print ('Python version: ' + platform.python_version())
print (os.path.dirname(sys.executable))

Next, click on the “Run cell (F5)” button, and you should see the ...