Including output from a notebook

If IBM® Cognos® Analytics for Jupyter Notebook is enabled in IBM Cognos Analytics, you can embed the output from a notebook code cell in a report.

Procedure

  1. In edit mode, click the Toolbox Toolbox icon icon, expand ADVANCED, and then double-click notebook icon Notebook.
  2. If you are in Page design view, double-click Double click here to select a notebook cell.
  3. If you are in Page preview view, click Select a notebook.
  4. Select a notebook, and then click Open.
  5. Select one of the notebook cells, and click OK.
  6. If you are in Page design view, switch to Page preview view to see the contents of the notebook cell.
  7. To see when the notebook cell was last updated, hover your cursor over the time stamp time stamp icon icon.
  8. You can hide or show the time stamp Time stamp icon icon by doing the following steps:
    1. Click the notebook cell.
    2. In the Properties pane, under Miscellaneous, toggle the Show timestamp property.

Results

Notebook output appears only in HTML output in the interactive viewer and is updated from the last time when the notebook was run.
Important: To display charts in reports by using the plotly package, you must set the package to plot in offline mode with the following command:
from plotly.offline import init_notebook_mode
init_notebook_mode()