From f854c93dc7aff3051085439d6473b32e8146a366 Mon Sep 17 00:00:00 2001 From: vivere-dally Date: Mon, 25 Aug 2025 15:08:22 +0300 Subject: [PATCH] Possibly accessing `toString` on null --- src/danfojs-base/core/frame.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/danfojs-base/core/frame.ts b/src/danfojs-base/core/frame.ts index 2f35c3d5..560e5408 100644 --- a/src/danfojs-base/core/frame.ts +++ b/src/danfojs-base/core/frame.ts @@ -2865,6 +2865,10 @@ export default class DataFrame extends NDframe implements DataFrameInterface { const data = this.values as ArrayType2D const newData = data.map((row) => { + if (row[columnIndex] === null || row[columnIndex] === undefined) { + return row + } + if (dtype === "float32") { row[columnIndex] = Number(row[columnIndex]) return row