polars.Expr.append#
- Expr.append(other: IntoExpr, *, upcast: bool = True) Self [source]#
Append expressions.
This is done by adding the chunks of other to this Series.
- Parameters:
- other
Expression to append.
- upcast
Cast both Series to the same supertype.
Examples
>>> df = pl.DataFrame( ... { ... "a": [8, 9, 10], ... "b": [None, 4, 4], ... } ... ) >>> df.select(pl.all().head(1).append(pl.all().tail(1))) shape: (2, 2) ┌─────┬──────┐ │ a ┆ b │ │ --- ┆ --- │ │ i64 ┆ i64 │ ╞═════╪══════╡ │ 8 ┆ null │ │ 10 ┆ 4 │ └─────┴──────┘