Skip to content

Nanuq 0.2

Choose a tag to compare

@pietroppeter pietroppeter released this 31 Oct 18:34
· 153 commits to main since this release
920b160

Nanuq 0.2 covers what a first real analysis needs: data types and casts, joins and concatenation, frame verbs, conditional and window expressions, column selectors, and CSV options with lazy scanCsv. The walkthrough is The great polar bear census. The prebuilt Polars library is lib-v0.2.0 (Polars 0.55), downloaded automatically.

Added

  • Data types: DataType constants with Polars names (Int64, String, ...), dtypes, schema, collectSchema, and cast taking a Nim type or DataType values, strict by default (#26)
  • Joins and concat: join (inner, left, right, full, semi, anti, cross) with validate, coalesce, maintainOrder; concat vertical, horizontal or diagonal (#28)
  • Frame verbs: drop, rename, tail, slice, reverse, withRowIndex, unique, multi-key sort with nullsLast, sample with seed, setRandomSeed (#30, #31)
  • Expressions: `when`/then/otherwise and the choose macro, isIn, isBetween, mod, div, ^, abs, round, median, var, quantile, len, fillNull(Forward), forwardFill, backwardFill, and windows with over (#33)
  • Column selectors: col(SomeNumber) and other Nim typeclasses, col(int), col("a", "b"), all(), exclude, name.suffix/name.prefix (#35)
  • CSV: lazy scanCsv with globs, and read options (separator, nullValues, schemaOverrides, skipRows, nRows, columns, ...) and write options (quoteStyle, floatPrecision, decimalComma, ...) (#37)
  • API conventions: Polars names in camelCase, option values as pure enums with Rust Polars names (#28)

Breaking

  • dtype(df, col) returns a DataType instead of a string; $ gives the old string (#26)
  • DataTypeKind is a pure enum with Polars names (DataTypeKind.Int64) (#28)

Known limitations

No dates, datetimes or categoricals yet, no string functions, and CSV is the only file format.

Full changelog: CHANGELOG.md

All PRs

Full Changelog: v0.1.0...v0.2.0