Closed ad-si closed 1 month ago
Also: readJSON
does the right thing.
console.log(
pl.readJSON(JSON.stringify([
{ name: "John", color: "green", height: null },
{ name: "Anna", color: "green", height: null },
])),
)
Please pass a schema to get your expected results. Thx
const rows = [
{ name: "John", color: "green", height: null },
{ name: "Anna", color: "green", height: null },
];
const schema = { name: pl.String, color: pl.String, height: pl.String,};
console.log( pl.readRecords(rows, { schema } ));
@ad-si Does the above solution works for you? Can this be closed? Thx
Your solution is a workaround and not a fix. So the issue itself still stands.
Except one issue in my expected behavior table: The column should actually have the type Unknown
https://docs.pola.rs/api/python/stable/reference/api/polars.datatypes.Unknown.html#polars.datatypes.Unknown
Have you tried latest version of polars?
What version of polars are you using?
0.15
What operating system are you using polars on?
macOS Sonoma 14.6.1 arm64
What node version are you using
bun 1.1.26
Describe your bug.
readRecords
discards columns with allnull
values.What are the steps to reproduce the behavior?
What is the actual behavior?
What is the expected behavior?