---
title: "Pivot"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/data/pivot
markdown: https://docs.nodetool.ai/nodes/nodetool/data/pivot.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/data/pivot.md
---

# Pivot

**Type:** `nodetool.data.Pivot`

**Namespace:** `nodetool.data`

## Description

Pivot dataframe to reshape data.
    pivot, reshape, transform

    Use cases:
    - Transform long data to wide format
    - Create cross-tabulation tables
    - Reorganize data for visualization

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| dataframe | `dataframe` | The DataFrame to pivot. | `{"type":"dataframe","uri":"","asset_id":null,"d...` |
| index | `str` | Column name to use as index (rows). | `` |
| columns | `str` | Column name to use as columns. | `` |
| values | `str` | Column name to use as values. | `` |
| aggfunc | `str` | Aggregation function: sum, mean, count, min, max, first, last | `sum` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `dataframe` |  |

## Related Nodes

Browse other nodes in the [nodetool.data](./) namespace.
