I want to vertically merge two polars.LazyFrame
s in order to avoid collecting both LazyFrames beforehand, which is computationally expensive. I have tried extend()
, concat()
, and vstack()
but none of them are implemented for LazyFrame
s. Maybe I am missing the point about LazyFrame
s by trying to perform this operation, but I am aware that join()
works, which would also alter the dataframe's structure.
pl.concat
can be used with LazyFrame
s:
>>> lf = pl.LazyFrame({"x": [1, 2]})
>>> pl.concat([lf, lf]).collect()
shape: (4, 1)
┌─────┐
│ x │
│ --- │
│ i64 │
╞═════╡
│ 1 │
│ 2 │
│ 1 │
│ 2 │
└─────┘