nodejs-polars
from Polars
docs
github
API
PythonのPolarsとほぼ同じだが、たまになかったり、JS固有の物があったりする
docsは例が載ってないことも多いので、慣れるまでは本家の方のdocsを読んだほうがいい
toRecords
DataframeからRecordに変換
https://pola-rs.github.io/nodejs-polars/interfaces/pl.DataFrame-1.html#torecords
困ったポイント
.applyがない
.whenとかを使って書けば同等のことができるが、再利用しづらい
bin/shared_traits.d.tsの型弱すぎないか
例えば、.eq()の引数の型がanyになっている
code:ts
.when(pl.col('hoge').eq('未入力')) // 型エラーなし、実行時エラー
code:ts
.when(pl.col('hoge').eq(pl.lit('未入力'))) // 型エラーなし. 正解