---
name: remove_tree_fields
kind: function
lang: py
domain: core
version: "1.0.0"
purity: pure
signature: "def remove_tree_fields(data: Any, fields: list[str] = None) -> Any"
description: "Elimina campos especificados recursivamente de un arbol (dict/list). Por defecto elimina 'text'."
tags: [tree, filter, fields, recursive]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
params:
  - name: data
    desc: "Estructura árbol (dict/list/valor) a procesar"
  - name: fields
    desc: "Lista de nombres de campo a eliminar recursivamente (default: ['text'])"
output: "Copia de la estructura sin los campos especificados"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/core/core.py"
source_repo: "https://github.com/VectifyAI/PageIndex"
source_license: "MIT"
source_file: "pageindex/utils.py"
---

## Ejemplo

```python
data = {"title": "A", "text": "largo...", "nodes": [{"title": "B", "text": "otro..."}]}
remove_tree_fields(data, ["text"])
# {"title": "A", "nodes": [{"title": "B"}]}
```

## Notas

Funcion pura. Crea nueva estructura sin los campos indicados. No muta el original.
