jupyter 写sql
介绍 (Introduction)
The Jupyter notebook is a powerful and interactive tool that supports various programming languages such as Python, R, Julia. This open-source utility is popular among data scientists and engineers. This notebook integrates both code and text in a document that allows you to execute code, view visualization, solve mathematical equations.
Jupyter笔记本是功能强大的交互式工具,支持各种编程语言,例如Python,R,Julia。 这个开源实用程序在数据科学家和工程师中很流行。 该笔记本将代码和文本都集成在文档中,使您可以执行代码,查看可视化效果,求解数学方程式。
We have covered SQL Notebooks in the Azure Data Studio in the following articles:
在以下文章中,我们介绍了Azure Data Studio中SQL Notebook:
- SQL Notebook in SQL Notebooks introduction and overview SQL Notebook中SQL Notebook简介和概述
- A handy SQL Notebook for troubleshooting in Azure Data Studio 方便SQL笔记本,用于在Azure Data Studio中进行故障排除
- Use Python SQL scripts in SQL Notebooks of Azure Data Studio 在Azure Data StudioSQL笔记本中使用Python SQL脚本
SQL Notebook is a version or reference from the Jupyter notebook. In this article, we will take an overview of the Jupyter notebook.
SQL Notebook是Jupyter笔记本的版本或参考。 在本文中,我们将概述Jupyter笔记本。
Jupyter笔记本入门 (Getting started with the Jupyter notebook)
Jupyter word is derived from the popular programming languages – Julia, Python, and R.
Jupyter单词源自流行的编程语言– Julia,Python和R。
We can start by going through the project Jupyter website.
我们可以从Jupyter项目网站开始。
Scroll down, and you get options to install Jupyter lab in your machine or test it in your browser. It is an interactive development environment for the notebook.
向下滚动,您可以选择在计算机上安装Jupyter Lab或在浏览器中对其进行测试。 它是笔记本的交互式开发环境。
在浏览器中尝试 (Try it in your browser)
It gives you an option to try in the web browser without installing locally. Let’s click on this link. It gives you various options such as try the classic notebook, try JupyterLab, try Jupyter with Julia.
它使您可以选择在Web浏览器中尝试而无需本地安装。 让我们单击此链接。 它为您提供了多种选择,例如尝试经典笔记本,JupyterLab,Jupyter和Julia。
Let’s go with JupyterLab that provides a new interface for the Jupyter notebooks. It takes some time to load JupyterLab. It provides documentation for the JupyterLab as shown below.
让我们来看一下JupyterLab,它为Jupyter笔记本电脑提供了新的界面。 加载JupyterLab需要一些时间。 它提供了JupyterLab的文档,如下所示。
We will not focus on the online Jupyter lab in this article. You can explore it using the available documentation.
本文中,我们将不关注在线Jupyter实验室。 您可以使用可用的文档进行探索。
在本地安装笔记本 (Install the Notebook locally)
On the homepage of the Jupyter webpage, click on Install the notebook. It opens a documentation page and gives you two different ways to install it.
在Jupyter网页的主页上,单击“安装笔记本”。 它会打开一个文档页面,并为您提供两种不同的安装方式。
- Install using the Python’s package manager utility pip 使用Python的软件包管理器实用程序pip进行安装
- Install using the Anaconda distribution 使用Anaconda发行版进行安装
In the article, Use Python SQL scripts in SQL Notebooks of Azure Data Studio, we use Python in SQL Notebooks. It would be easy for you as well to correlate the things so we will install Jupyter notebook using Python.
在文章“ Azure Data StudioSQL笔记本中使用Python SQL脚本”中 ,我们在SQL笔记本中使用Python。 您也很容易将它们关联起来,因此我们将使用Python安装Jupyter Notebook。
Open Azure Data Studio and a new SQL notebook. In this notebook, switch to kernel Python. First, upgrade the pip utility using the following command and restart the Azure Data Studio.
打开Azure Data Studio和一个新SQL笔记本。 在此笔记本中,切换到内核Python。 首先,使用以下命令升级pip实用程序,然后重新启动Azure Data Studio。
Pip install –upgrade pip