Skip to content

User guide

Each chapter takes one kind of work and shows it in code that runs: every block is a Go example the test suite runs, and the output under it is what it printed. The examples read the quick start's sales.csv, eight orders, its dates read as dates, unless a chapter says otherwise:

func sales() *ursus.LazyFrame {
    return ursus.ScanCSV("testdata/sales.csv",
        ursus.WithSchemaOverrides(map[string]ursus.DataType{"date": ursus.Date}))
}
  • Selecting and filtering


    Columns by name, pattern or type; rows by predicates; sorting, top-k, unique rows and slices.

  • Aggregation and group-by


    Aggregates per group and over the whole frame, conditional aggregates, lists per group, and summaries.

  • Window functions


    An aggregate beside every row, cumulative and shifted values, ranks, rolling windows by rows and by time, and exponential averages.

  • Joins


    Every join kind, keys, suffixes and validation, as-of joins, joins on a condition, and filters by another frame.

  • Reshaping


    Pivot and unpivot, explode and unnest, concatenating frames, and transpose.

  • Strings


    Cleaning, matching with regular expressions, extracting, replacing, splitting, and parsing numbers and dates.

  • Lists and structs


    List columns and the questions to ask of them, expressions over their elements, sets, and struct fields.

  • Dates and times


    Parsing, calendar arithmetic, time zones, ranges, and groups by day, week or a rolling period.

  • Missing data


    Counting nulls, filling them from a value or the neighbours, coalescing, interpolating, and dropping.

  • Go values in and out


    Frames from Go slices, typed columns as Series, rows into structs, and streaming an answer a batch at a time.

  • Go functions


    Go functions inside a query, a value or a batch at a time, with nulls, errors and concurrency.

  • CSV, Parquet and Arrow


    Scans and their options, globs, object storage, pushdown into Parquet, sinks, and Arrow in and out.