Datasets

Datasets are tables of data you can create, view, and query directly in your calculations. Create a dataset from a CSV upload or from Python using pandas, then reference it in calculations

Creating a Dataset

Upload a CSV

  1. Open the Files panel on the right side of the editor

  2. Click the + button

  3. Select your CSV file

The uploaded CSV is automatically added as a node in the calculation, available as a named dataset variable you can reference in your calculations.

From Python

Create a dataset in a Python node by defining a pandas DataFrame. CalcTree automatically detects DataFrames and saves them as datasets.

import pandas as pd

beam_data = pd.DataFrame({
    "beam_id": ["B001", "B002", "B003", "B004"],
    "span": [6.0, 8.0, 5.5, 10.0],
    "load_kN": [15, 22, 12, 30],
    "material": ["Steel", "Steel", "Timber", "Steel"]
})

Once the Python node runs, beam_data becomes a named variable you can reference in other nodes.

Loading and Keeping Datasets in Python

In Python, you can load a dataset from another node or keep a DataFrame as a dataset output:

Viewing a Dataset

Click on a dataset variable to open the Dataset Viewer. It provides:

  • Paginated table view — large datasets load in chunks for performance

  • Sortable columns — click column headers to sort

  • Column type indicators — each column shows its type (Int, Float, Boolean, String)

  • Filtering — filter rows by column values

  • Grouping — group rows by one or more columns

You can also open a dataset as a tab in the editor layout for side-by-side viewing with your document.

Using Datasets in Math Formulas

Reference dataset columns and values directly in math formula nodes:

Extract a column

Get column names

Count rows

Look up values

Conditional aggregation

See Dataset & Lookup Functionsarrow-up-right for the full list of functions available for working with datasets.

Referencing a Dataset in Your Page

To insert a dataset into your document, type @ and start typing the dataset name. A dropdown will appear with matching variables — select the dataset to insert a live reference.

This works anywhere in the page editor, so you can embed dataset references inline alongside your written content.

Last updated