Files
fn_registry/python/functions/datascience/impute.md
T
egutierrez eaed99e52c feat: funciones Python para core, cybersecurity, datascience y finance
Agrega funciones Python reutilizables organizadas por dominio:
- core: composicion funcional (pipe, compose, map, filter, reduce, etc.)
- cybersecurity: analisis de amenazas y puertos
- datascience: estadisticas y deteccion de outliers
- finance: indicadores tecnicos y analisis financiero
2026-03-29 00:13:50 +01:00

33 lines
641 B
Markdown

---
name: impute
kind: function
lang: py
domain: datascience
version: "1.0.0"
purity: pure
signature: "def impute(data: list) -> list"
description: "Reemplaza None y NaN con la media de los valores validos."
tags: [imputation, missing, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [math]
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/datascience/datascience.py"
---
## Ejemplo
```python
impute([1.0, None, 3.0, float('nan'), 5.0])
# [1.0, 3.0, 3.0, 3.0, 5.0]
```
## Notas
Detecta tanto None como float('nan'). Si no hay valores validos, rellena con 0.0.