diff --git a/dataframely/collection/collection.py b/dataframely/collection/collection.py index 059d52b..d85662f 100644 --- a/dataframely/collection/collection.py +++ b/dataframely/collection/collection.py @@ -808,12 +808,15 @@ def cast(cls, data: Mapping[str, FrameType], /) -> Self: # ---------------------------------- COLLECTION ---------------------------------- # - def collect_all(self) -> Self: + def collect_all(self, **kwargs: Any) -> Self: """Collect all members of the collection. This method collects all members in parallel for maximum efficiency. It is particularly useful when :meth:`filter` is called with lazy frame inputs. + Args: + kwargs: Keyword arguments passed directly to :meth:`polars.collect_all`. + Returns: The same collection with all members collected once. Members annotated with :class:`~dataframely.DataFrame` are returned as DataFrames, while @@ -821,7 +824,7 @@ def collect_all(self) -> Self: "shallow-lazy" frames (obtained by calling ``.collect().lazy()``). """ lazy_dict = self.to_dict() - dfs = pl.collect_all(lazy_dict.values()) + dfs = pl.collect_all(lazy_dict.values(), **kwargs) return self._init(dict(zip(lazy_dict, dfs))) def pipe(