Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I'm trying to transform a column of a DataFrame:
import dfd from "danfojs-node";
const df = new dfd.DataFrame({
a: [1, 2, 3],
b: ["a", "b", "c"],
});
// ** METHOD 1 **
df["b"] = df["b"].map((value) => value.toUpperCase());
console.log(df["b"].values());
// error: File format not supported!
// ** METHOD 2 **
const transformed = df["b"].map((value) => value.toUpperCase());
df.addColumn(
"b",
transformed,
{ inplace: true },
);
console.log(df["b"].values());
// error: File format not supported!Full error stack trace:
throw new Error("File format not supported!");
^
Error: File format not supported!
at Series.NDframe (/home/bluesk/Documents/news_aggregator/news_
anfojs-base/core/generic.js:100:23)
at new Series (/home/bluesk/Documents/news_aggregator/news_aggr
js-base/core/series.js:134:28)
at DataFrame.$getColumnData (/home/bluesk/Documents/news_aggreg
ode/dist/danfojs-base/core/frame.js:196:24)
at DataFrame.get (/home/bluesk/Documents/news_aggregator/news_a
nfojs-base/core/frame.js:147:37)
at file:///home/bluesk/Documents/news_aggregator/news_aggregato
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:
at async loadESM (node:internal/process/esm_loader:34:7)
To Reproduce
Run the above code.
Expected behavior
No error should be raised, I should be able to access the 'b' column and its values.
Desktop (please complete the following information):
- OS: Linux
- Nodejs Node.js v20.9.0
Reacted by Ștefan Buciu, Artem Derun, Gustavo Miranda, Zander, Rising Odegua and Ivan Pupkin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
vivere-dally commentedon Aug 27, 2024
Up, facing the same issue
junduck commentedon Nov 12, 2025
I can confirm this is a bug. However, your code is wrong, you should use
df["b"].valuesinstead ofdf["b"].values()this is the full reproducible code:This bug comes from the proxy column setter $setColumnData, it wrongly assigns arr to the column instead of extracted values of arr.
You can simply trigger this by any column assignment:
I'll create a fix for this in a minute.
Fixed error: File format not supported! while trying to reassign a co…
jeannekamikaze commentedon Feb 19, 2026
Can we merge this?
Seeing this too in 1.2.0 after calling
dropNa()orrename()on a data frame.$dataIncolumnFormatgets messed up with an object that holds the data array instead of just holding the array directly.