Vindaar / ggplotnim

A port of ggplot2 for Nim
https://vindaar.github.io/ggplotnim
MIT License
177 stars 15 forks source link

Some column improvements #66

Closed Vindaar closed 4 years ago

Vindaar commented 4 years ago

Some small column improvements. One can now hand other int / float types (int8, float32 etc.) as arguments to toColumn or straight df["key"] = ....

Note, for arraymancer releases prior to https://github.com/mratsim/Arraymancer/pull/437 will see slight performance regressions on assignments of float and int tensors, since asType will map the whole tensor regardless of the input / output types.

Also []=(df: DataFrame, key) now returns a var Column instead of Column. This allows to directly change the retrieved column. Since both the data frame, the column and arraymancer tensor are reference objects anyways, this only makes sense.

So df["x"][idx] = val is now valid.