Skip to content

Python Notebook

A sandboxed notebook for Python and R on your project data.

On this page
Narrated walkthrough: the four ways to start; a wine dataset loaded from a project; a bar chart, a correlation heatmap and a random forest, each written by AI from a plain-language request and then run; a tested recipe; and export. Sample data.

When a method is not on the platform, write it yourself. The notebook runs real Python against your project data, isolated from the app so a runaway cell cannot affect anything else, with pip installs available inside the sandbox.

  • Subprocess-isolated kernel with per-cell timeouts (a runaway cell can’t take down the app)
  • Load any project dataset into the kernel as a pandas DataFrame named df — it is also written to the working folder as <Dataset_Name>.csv, the file name the reproducible code from every studio reads, so that code pastes in and runs unchanged
  • Cell magics, inline plots, and a live variable inspector
  • Optional AI assist with automatic privacy redaction

R cells#

Every code cell has a Python | R switch, and the bar under the last cell adds a Python cell, an R cell, a text cell or a recipe. An R cell runs in an R session beside the Python kernel, in the same sandbox: it keeps its variables between cells, prints results as RStudio does, draws base R and ggplot2 figures at 144 dpi, and shows a data frame as a table. The loaded dataset is df in R too. Installed: the tidyverse core, data.table, broom, lme4, survival, car, emmeans, DESeq2, edgeR, limma and WGCNA.

Recipes, without code or AI#

Recipes (Ctrl/Cmd+K) are tested analyses that run on your data as they are, from cleaning and charts to models, including R recipes for t-tests, ANOVA, regression, mixed models, survival and sample size. When a recipe uses particular columns and a dataset is loaded, Choose columns asks which ones; a box left empty lets the recipe pick a column that fits.

Fix with AI, and its limits#

Fix with AI starts by itself with the error and the cell's code. Replace and run, or Insert below and run, puts the fix in and runs it; if it still fails, the new error is fixed automatically, up to two more times. Each request to write, change, fix or explain code counts toward the organisation's monthly AI actions, and one person can make up to 300 a day (or a quarter of the monthly allowance, if that is smaller). The assistant only writes analysis code for the notebook.

STL decomposition of a monthly series into trend, a seasonal cycle and the remainder — the three panels a reviewer asks to see before any forecast.
Something missing?

Have a question these docs don’t answer? Email support@nexmetry.org and we’ll add a guide.