Skip to content

アプリケーション内で をクリックすると、お使いのDataRobotバージョンに関する全プラットフォームドキュメントにアクセスできます。

Create and execute cells

You can create and run code, text, and chart cells within your notebook. Before proceeding, be sure to review the guidelines for configuring and initializing a notebook environment.

Use the DataRobot API

Within DataRobot Notebooks you can easily use the DataRobot API. The environment images DataRobot provides come with the respective DataRobot Python and R clients preinstalled. DataRobot automatically fetches your endpoint and your API token and sets them as environment variables (DATAROBOT_ENDPOINT and DATAROBOT_API_TOKEN for Python and DATAROBOT_API_ENDPOINT and DATAROBOT_API_TOKEN for R) within your notebook container, so that when the session starts up it automatically handles client instantiation without requiring manual authentication.

Import the DataRobot package to start using the Python client:

import datarobot as dr

Import the DataRobot library to start using the R client:

library(datarobot)

Create code cells

The default image for the notebooks is a pre-built Python image with all the dependencies and common open-source software (OSS) libraries preinstalled. To see the list of all packages available in the default image, hover over that image in the Environment tab:

備考

DataRobot notebooks are not polyglot; run Python code or R code in a notebook, but do not intermingle both. The language supported will depend on the image you’ve selected for the notebook’s environment configuration.

For more information about configuring a notebook's environment, read about environment management.

Add libraries

Follow the instructions below to ad-hoc install additional libraries in Python or R.

備考

Notebooks support rich outputs similar to Jupyter, so you can use plotting libraries of your choice (such as matplotlib, seaborn, etc.) and see the plotted charts inline within the cell output. You can run other shell commands for Python as well by using the ! notation.

Note that when the session restarts, these ad-hoc installations will not persist as the environment will revert back to the original state of the pre-built image.

To install and use a Python package that is not included in the default image, run the following within a code cell:

!pip install <your-package>

You can work with the R language in a notebook instead of Python by selecting the pre-built R image from the Environment tab. You can then write and execute R code in the code cells of the notebook with the R kernel. To install and use additional R packages, use devtools from a code cell or the following code:

install.packages(<package_name>)

Create text cells

Markdown text cells support traditional Markdown syntax and GitHub-flavored Markdown syntax. Render Markdown cells by executing the cell. To edit a rendered Markdown cell, double click on the cell.

チャートセルの作成

DataRobot allows you to create built-in, code-free chart cells within DataRobot Notebooks, enabling you to quickly visualize your data without coding your own plotting logic.

備考

Note that chart cells are only supported for Python notebooks. Rノートブックでは使用できません。

To add a code cell, hover your cursor outside of a cell in the notebook and select the Chart option.

When you add a chart cell to a notebook, you first need to specify the data you want to visualize by selecting a DataFrame. チャートセル内のドロップダウンリストから、DataFrameに対応する変数名を選択します。 The cell lists all of the DataFrame objects that are currently in-memory.

備考

Note that DataRobot only plots the first 5,000 rows of the DataFrame.

After selecting a DataFrame, pick the type of chart you want to create. DataRobot offers configurations for bar charts, line charts, scatter plots, and area charts. それらはすべて、同じ設定フィールドを必要とします(詳細は以下を参照)。

フィールド 説明
タイトルを表示 チャートのタイトルを表示します。 有効にしたら、タイトルの名前を入力します。
ツールチップを表示 Shows tooltips with more details on the data when hovering over the chart.
凡例を表示 凡例を表示します。
X軸(ディメンション) X軸としてエンコードする列をDataFrame(ドロップダウンリストとして提供)から選択します。
Y軸(メジャー) Y軸としてエンコードする列をDataFrame(ドロップダウンリストとして提供)から選択します。
チャート内容の色を選択します。

In addition to the configuration above, you can modify aspects of the X- and Y-axes by selecting the settings wheel next to each field.

トグル 説明
軸ラベルを非表示にする 軸のラベルがチャートに表示されないようにします。
グリッドを非表示にする Removes the grid pattern in the background of the chart.
ツールチップで非表示にする Hides the value for the axis in the tooltip shown when hovering on points of the chart.
Show point markers チャート内の軸で、ポイントに沿ってポイントマーカーを表示します。
集約 軸の値を集計するかどうかを設定します。 You can aggregate by a variety of values, including the median, mean, sum, standard deviation, and more.

チャートを設定したら、右上のアイコンを使ってセルの表示方法を編集できます。

  • 鉛筆アイコンを選択すると、チャートセルのエディターメニューが非表示になります。
  • ダウンロードアイコンをクリックすると、チャートのローカルコピーをSVGファイルとして保存できます。
  • ゴミ箱アイコンを選択すると、チャートセルが削除されます。
  • Click the menu icon to access the actions available for the cell.

目次

As you create and execute cells to develop your notebook, DataRobot automatically generates a table of contents for easier navigation. To access it, click the table of contents icon () in the sidebar.

The Markdown tab provides an autogenerated table of contents. Each entry maps to headings in the notebook's Markdown cells, corresponding to the Markdown heading level (#, ##, ###, etc.). Entries are hyperlinked, so clicking on an entry navigates you to the corresponding cell in the notebook.

The Cells tab provides an overview of all cells within the notebook (both code and Markdown cells). You can perform cell actions (and move cells around via drag-and-drop) from the cell list in the table of contents.

Cell settings

You can configure notebook-wide cell settings by accessing the gear icon menu at the top right of the Notebook header.


更新しました April 19, 2023
Back to top