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 and lag (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()