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.
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.
- My bad, I did not read the error message of my concat() attempt close enough. Thank you for the answer! – realbitsurfer Commented Mar 12 at 16:41
1 Answer
Reset to default 8pl.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 │
└─────┘
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744834890a4596202.html
评论列表(0条)