Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
784 stars 50 forks source link

prev() in fillNA.with does not reference the updated DataRow #523

Open n3utrino opened 8 months ago

n3utrino commented 8 months ago

Might be a user error, but it feels like the statement

data.fillNA("ref").with { prev()!!.ref }

Should fill all the "ref" rows and not only the first empty one.

Screenshot 2023-11-29 at 05 43 13
koperagen commented 8 months ago

It should. Thank you for finding this problem :)

koperagen commented 8 months ago

Actually it's more like missing documentation or API not being clear. It should work like this:

df.fillNA("ref").with { prev()?.newValue<String>() }