Kotlin / Kotlin/dataframe

Do we need a Digitize function?

Open
#1,124 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Numpy has a digitize function: https://numpy.org/doc/stable/reference/generated/numpy.digitize.html It's used to bin values from a column into given bins.

DataFrame has had [a version of digitize](https://github.com/Kotlin/dataframe/blob/0.15.0/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/digitize.kt) for a while, but it's not well tested, or used, or optimized with binary search.

It will be [removed](https://github.com/Kotlin/dataframe/pull/1125) in its current state.

Please use this issue to let us know whether you need or use something like `digitize` and how you use it so we can decide together whether DataFrame needs a function like this.

Contributor guide

Open the contributing guide

Research direction

Read the existing core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/digitize.kt implementation and the linked removal pull request. Review the NumPy digitize behavior, then gather reported DataFrame use cases to determine whether a replacement is needed. Done means reaching a project decision about retaining, redesigning, or removing the function.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.