Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

  1. LazyFrame.filter filters rows using an Expr while DataFrame.filter filters rows using a mask of the type ChunkedArray<BooleanType>.

shape: (3, 3) ┌───────┬────────┬──────────────┐ │ names ┆ values ┆ values_nulls │ │ --- ┆ --- ┆ --- │ │ str ┆ i32 ┆ i32 │ ╞═══════╪════════╪══════════════╡ │ a ┆ 1 ┆ 1 │ ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │ b ┆ 2 ┆ null │ ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │ c ┆ 3 ┆ 3 │ └───────┴────────┴──────────────┘
shape: (3,) ChunkedArray: 'values_nulls' [bool] [ true false true ]
Ok(shape: (2, 3) ┌───────┬────────┬──────────────┐ │ names ┆ values ┆ values_nulls │ │ --- ┆ --- ┆ --- │ │ str ┆ i32 ┆ i32 │ ╞═══════╪════════╪══════════════╡ │ a ┆ 1 ┆ 1 │ ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │ c ┆ 3 ┆ 3 │ └───────┴────────┴──────────────┘)
Ok(shape: (1, 3) ┌───────┬────────┬──────────────┐ │ names ┆ values ┆ values_nulls │ │ --- ┆ --- ┆ --- │ │ str ┆ i32 ┆ i32 │ ╞═══════╪════════╪══════════════╡ │ a ┆ 1 ┆ 1 │ └───────┴────────┴──────────────┘)
Ok(shape: (1, 3) ┌───────┬────────┬──────────────┐ │ names ┆ values ┆ values_nulls │ │ --- ┆ --- ┆ --- │ │ str ┆ i32 ┆ i32 │ ╞═══════╪════════╪══════════════╡ │ a ┆ 1 ┆ 1 │ └───────┴────────┴──────────────┘)