Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tablecloth.api/percentiles is not supposed to add a column #169

Open
daslu opened this issue Sep 25, 2024 · 2 comments
Open

tablecloth.api/percentiles is not supposed to add a column #169

daslu opened this issue Sep 25, 2024 · 2 comments

Comments

@daslu
Copy link
Member

daslu commented Sep 25, 2024

The following was reported by @lvh on a Slack thread:
https://clojurians.slack.com/archives/C0BQDEJ8M/p1727016052908239

tablecloth.api/percentiles is currently expected to add a column to a dataset, but this does not make sense.
https://github.com/scicloj/tablecloth/blob/1d501aa/src/tablecloth/api.clj#L1790

The percentiles computation indeed returns a collection of numbers, but the elements of that collection are simply the percentiles -- they do not correspond to the actual rows of the dataset, and thus they do not make sense as a new column.

@genmeblog
Copy link
Member

It was (accidentally) added by a column project. Here is the full list, maybe it's good to review it again to avoid similar pitfalls.

* + - / < <= > >= abs acos and asin atan atan2 bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-xor cbrt ceil cos cosh cummax cummin cumprod cumsum distance distance-squared dot-product eq even? exp expm1 finite? floor get-significand hypot identity ieee-remainder infinite? kurtosis log log10 log1p logistic magnitude magnitude-squared mathematical-integer? max mean mean-fast median min nan? neg? next-down next-up normalize not not-eq odd? or percentiles pos? pow quartile-1 quartile-3 quot reduce-* reduce-+ reduce-max reduce-min rem rint round shift signum sin sinh skew sq sqrt sum sum-fast tan tanh to-degrees to-radians ulp unsigned-bit-shift-right variance zero?)

@lvh
Copy link

lvh commented Sep 25, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants