krangl / krangl / pctChange

pctChange

fun DataCol.pctChange(): DataCol

Calculates the percentage change between the current and a prior column value.

TODO: NA values are padded with the last known previous value.

Also see https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pct_change.html

Exceptions

InvalidColumnOperationException - If the type of the receiver column is not numeric