krangl question: I could not find equivalent of pa...
# datascience
s
krangl question: I could not find equivalent of pandas.Dataframe.shift(-1) function so I am using following code to do that. any better way or any function available should use?
df.addColumn("label") {it["range"].asDoubles().drop(1) + listOf(Double.NaN)}
h
lead/lag were added in v0.13 https://github.com/holgerbrandl/krangl/blob/master/CHANGES.md#v013 which should fix your problem.
s
Thanks!👍