Skip to content

Commit 071d6b9

Browse files
feat: Add kwargs to Collection.collect_all() (#361)
1 parent a523310 commit 071d6b9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

dataframely/collection/collection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,20 +808,23 @@ def cast(cls, data: Mapping[str, FrameType], /) -> Self:
808808

809809
# ---------------------------------- COLLECTION ---------------------------------- #
810810

811-
def collect_all(self) -> Self:
811+
def collect_all(self, **kwargs: Any) -> Self:
812812
"""Collect all members of the collection.
813813
814814
This method collects all members in parallel for maximum efficiency. It is
815815
particularly useful when :meth:`filter` is called with lazy frame inputs.
816816
817+
Args:
818+
kwargs: Keyword arguments passed directly to :meth:`polars.collect_all`.
819+
817820
Returns:
818821
The same collection with all members collected once. Members annotated
819822
with :class:`~dataframely.DataFrame` are returned as DataFrames, while
820823
members annotated with :class:`~dataframely.LazyFrame` are returned as
821824
"shallow-lazy" frames (obtained by calling ``.collect().lazy()``).
822825
"""
823826
lazy_dict = self.to_dict()
824-
dfs = pl.collect_all(lazy_dict.values())
827+
dfs = pl.collect_all(lazy_dict.values(), **kwargs)
825828
return self._init(dict(zip(lazy_dict, dfs)))
826829

827830
def pipe(

0 commit comments

Comments
 (0)