pola-rs / nodejs-polars

nodejs front-end of polars
https://pola-rs.github.io/nodejs-polars/
MIT License
437 stars 44 forks source link

generic signature for dataframes #292

Open scarf005 opened 6 days ago

scarf005 commented 6 days ago

Motivation

continuation of #151.

to reiterate:

Feature Request

To-be

import pl from "npm:nodejs-polars"

const df = pl.DataFrame({
    fruit: ["Apples", "Oranges"],
    comparability: [0, 1],
})
// df: pl.DataFrame<{ fruit: pl.Series<"Utf8">, comparability: pl.Series<"Float64"> }>

const obj = df.toObject()
// obj: { fruit: string[], comparability: number[] }

const fruit = df.getColumn('fruit')
// fruit: pl.Series<"Float64">

Additional Notes

current progress (2024-11-14):