qri-io / starlib

qri's standard library for starlark
MIT License
116 stars 29 forks source link

feat(dataframe): Series math operations: add, subtract, abs #161

Closed dustmop closed 2 years ago

dustmop commented 2 years ago

Series can be added and subtracted to each other. Finally, we get to take advantage of the series struct storing slices of ints and floats by accessing them directly in a loop. Add a dataframe.abs function, which takes the abs of an entire series, one element at a time. Due to starlark's lack of ability to override builtins, we can't use the standard abs function.