Skip to content

Commit 98975b5

Browse files
author
gabriel
committed
update doctrings
1 parent 51ced99 commit 98975b5

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

dataframely/collection/collection.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ class Collection(BaseCollection, ABC):
6868
to 1-N relationships that are managed in separate data frames.
6969
7070
A collection must only have type annotations for :class:`~dataframely.LazyFrame`
71-
with known schema:
71+
or :class:`~dataframely.DataFrame` with known schema:
7272
7373
.. code:: python
7474
7575
class MyCollection(dy.Collection):
7676
first_member: dy.LazyFrame[MyFirstSchema]
77-
second_member: dy.LazyFrame[MySecondSchema]
77+
second_member: dy.DataFrame[MySecondSchema]
7878
7979
Besides, it may define *filters* (c.f. :meth:`~dataframely.filter`) and arbitrary
8080
methods.
@@ -788,12 +788,10 @@ def collect_all(self) -> Self:
788788
particularly useful when :meth:`filter` is called with lazy frame inputs.
789789
790790
Returns:
791-
The same collection with all members collected once.
792-
793-
Note:
794-
As all collection members are required to be lazy frames, the returned
795-
collection's members are still "lazy". However, they are "shallow-lazy",
796-
meaning they are obtained by calling `.collect().lazy()`.
791+
The same collection with all members collected once. Members annotated
792+
with :class:`~dataframely.DataFrame` are returned as DataFrames, while
793+
members annotated with :class:`~dataframely.LazyFrame` are returned as
794+
"shallow-lazy" frames (obtained by calling ``.collect().lazy()``).
797795
"""
798796
lazy_dict = self._to_lazy_dict()
799797
dfs = pl.collect_all(lazy_dict.values())

dataframely/collection/filter_result.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def collect_all(self, **kwargs: Any) -> CollectionFilterResult[C]:
4040
kwargs: Keyword arguments passed directly to :meth:`polars.collect_all`.
4141
4242
Returns:
43-
The same filter result object with all lazy frames collected and exposed as
43+
The same filter result object with all frames collected. Members annotated
44+
with :class:`~dataframely.DataFrame` are returned as DataFrames, while
45+
members annotated with :class:`~dataframely.LazyFrame` are returned as
4446
"shallow" lazy frames.
4547
4648
Attention:

0 commit comments

Comments
 (0)