Closed petrkozorezov closed 4 weeks ago
It's impossible to calculate quantiles when there are duplicates.
Explorer.Series.from_list([0.0, 0.0, 0.0, 3.0, 4.0, 5.0]) |> Explorer.Series.qcut([0.1, 0.25, 0.75])
** (RuntimeError) Polars Error: duplicate: quantiles are not unique while allow_duplicates=False (explorer 0.9.2) lib/explorer/polars_backend/shared.ex:18: Explorer.PolarsBackend.Shared.apply/2 (explorer 0.9.2) lib/explorer/polars_backend/series.ex:549: Explorer.PolarsBackend.Series.qcut/5 #cell:tug3ltfjbo7jbnjh:2: (file)
There is an option that we need to expose. I will fix that soon. Thanks for the report!
It's impossible to calculate quantiles when there are duplicates.