A Jupyter Notebook Extension for DolphinDB.
Project description
jupyter-notebook-extension
DolphinDB Jupyter Notebook 扩展插件
Jupyter Notebook是基于网页的用于交互计算的应用程序。用户可以直接通过浏览器编辑和交互式运行代码。DolphinDB database 提供了Jupyter Notebook的插件,用户可以使用 Jupyter Notebook编写DolphinDB脚本并运行。
DolphinDB Jupyter Notebook 扩展插件提供以下功能:
- 为用户提供Jupyter Notebook连接DolphinDB Server的配置界面
- 使Jupyter Notebook支持DolphinDB脚本语言的执行
1. 下载插件并安装
-
使用pip安装
pip install dolphindb_notebook
-
启用插件
jupyter nbextension enable dolphindb/main
2. 配置Jupyter Notebook
- 通过命令行
jupyter notebook --generate-config
生成配置文件 - 通过命令行
jupyter kernelspec list
查看Jupyter Notebook的工作路径: xxx/share/jupyter/kernels - 打开配置文件jupyter_notebook_config.py,找到c.NotebookApp.notebook_dir选项,设为上一步查找到的工作路径,并去掉注释#
3. 连接DolphinDB Server
- 在命令行输入
jupyter notebook
,启动Jupyter Notebook - 在Jupyter Notebook的页面右侧点击新建,选择DolphinDB,新建一个DolphinDB notebook
- 点击notebook工具栏的Connect to DolphinDB Server按钮。选择相应的server,然后点击右下角Connect按钮,即与DolphinDB server建立连接(如果不需要该server,可以点击Delete按钮删除
- 也可以通过New按钮,输入新的server信息,然后点击Save & Connect按钮即与DolphinDB server建立连接,并保存该信息以便下次使用
4. 编辑和运行DolphinDB脚本
连接DolphinDB Server后,在代码块区域编写DolphinDB脚本,点击运行即可运行相应代码块
5. 展示代码块运行结果
每次运行DolphinDB脚本后,运行结果都会在相应的代码块下方展示。对于DolphinDB的绘图功能,以富媒体格式PNG展示结果
注意:
- 对于一些数据量较大的结果,可能会出现IOPub数据率超出限制的问题,可以将Jupyter Notebook配置文件中的c.NotebookApp.iopub_data_rate_limit调高,并去掉注释#即可
- 对于超出60行的表格,只显示前五行与后五行
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dolphindb_notebook-0.0.2.tar.gz
.
File metadata
- Download URL: dolphindb_notebook-0.0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 381cc25cbacd3d4bacd73b0c10b53a84b08b691f9269ea18d1170076d9f54d68 |
|
MD5 | 047c2bd6db6bf25693413db0b2381ccf |
|
BLAKE2b-256 | 773ecbdfb44ec639684c4d9b0f56676b1ad6e405167df110fa20a30f532b52f5 |
File details
Details for the file dolphindb_notebook-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: dolphindb_notebook-0.0.2-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d85cd3b66796e79a275168b836a174495cb0e343415cb4f5677ac3060dd3469 |
|
MD5 | 41d17dc8a794e17e8f1ec41b59914439 |
|
BLAKE2b-256 | dbec5cecafd2549901b35a4f5ed60d2b9e5855cf32cfc656adcf8520f3daff6c |