Loading tutorials
pl.col, and that you know what rows, columns and keys are. Every later chapter on grouping, joining and windows builds on the two ideas here.2 min readpl.col. It also builds on the idea that an expression describes a computation and a context decides where it runs.2 min readpl.col, and run a basic group_by(...).agg(...). It extends that pattern in two ways. You can compute several summaries in one pass, and you can restrict each summary to the rows you care about.2 min readgroup_by(...).agg(...) and know how to use pl.col. It covers a detail that surprises many people: the order of the rows that group_by returns.2 min readjoin with how="inner" and how="left". Here you will control which columns are matched and what happens when both tables share a column name that is not a key.2 min readon, left_on, and right_on arguments from earlier chapters. The four joins here cover cases those two can't: keeping unmatched rows from both sides, filtering one table by another, and pairing every row with every row.2 min readjoin with on= and know the left and inner join types. A join can return the wrong number of rows without raising any error. Two causes are duplicate keys and null keys. Polars lets you check for both.2 min readpl.col, and use group_by with agg. Here you will learn how over computes a per-group value and keeps every row.2 min readwith_columns, pl.col, and the basic form of over from the previous chapter. You should also know that over keeps the original row count.2 min readover from the earlier chapter on per-group values. You should also be comfortable with with_columns and select. Here you will learn how over places its results back into the table, and how to change that with mapping_strategy.2 min readwith_columns and group_by expressions and know what over does. Here you will compute moving statistics, such as a three-day average, without reducing the number of rows.2 min readgroup_by with agg, can build a Polars DataFrame, and understand rolling expressions from the previous chapter. Here you will aggregate rows into fixed time intervals with group_by_dynamic.2 min readjoin with on keys, null values after a left join, and how to sort a DataFrame. An as-of join is for ordered keys such as timestamps, where an exact match rarely exists.2 min readpl.col, and have seen group_by, join, and over on their own. Here you learn to pick one by looking at the shape of the result you need.2 min readgroup_by/agg, joins, and over expressions on a DataFrame, as covered earlier. It shows how to run the same code lazily.2 min read