krangl v0.13 Release Notes
Release Date: 2020-07-02 // over 3 years ago-
๐ Released: 2020-06-02
โ Added column transformation to calculate cumulative sum
cumSum
sales .sortedBy("quarter") .addColumn("cum_sales" to { it["sold_units"].cumSum()})
๐ Added column transformation
pctChange
to calculate percentage change between the current and a prior element. similar to pct_change in pandas (contributed by @amorphous1 in PR85)sales .groupBy("product") .addColumn("sales_pct_change" to { it["sold_units"].pctChange() })
โ Added
lead
andlag
(contributed by @amorphous1 in PR85)sales .groupBy("product") .sortedBy("quarter") .addColumn("prev_quarter_sales" to { it["sold_units"].lag() })
๐ Significantly improved join performance (contributed by @amorphous1 in PR85)
๐ New: Extended
bindRows
API to combine data rowwise (see PR #77 by @CrystalLord)val person1 = mapOf("person" to "James", "year" to 1996) val person2 = mapOf("person" to "Anne", "year" to 1998)
emptyDataFrame().bindRows(person1, person2).print()