Skip to content

Commit c9ac2dc

Browse files
Scott5Scpcloud
authored andcommitted
docs(relations): enhance docstrings for pivot_wider to clarify lazy evaluation parameter
1 parent 739b91c commit c9ac2dc

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

ibis/expr/types/relations.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4572,8 +4572,10 @@ def pivot_wider(
45724572
An explicit sequence of values to look for in columns matching
45734573
`names_from`.
45744574
4575-
* When this value is `None`, the values will be computed from
4576-
`names_from`.
4575+
* When this value is `None`, the values will be computed by executing
4576+
a query against the backend to discover unique values
4577+
from `names_from`. This breaks lazy evaluation and may be slow
4578+
on large or remote datasets.
45774579
* When this value is not `None`, each element's length must match
45784580
the length of `names_from`.
45794581
@@ -4878,8 +4880,9 @@ def pivot_wider(
48784880
│ … │ … │ … │ … │
48794881
└───────┴──────────┴──────────┴──────────┘
48804882
4881-
Select a subset of names. This call incurs no computation when
4882-
constructing the expression.
4883+
Select a subset of names. Unlike the previous call,
4884+
providing names explicitly avoids executing a query
4885+
to discover unique values, keeping expression construction lazy.
48834886
48844887
>>> production.pivot_wider(
48854888
... names_from=["product", "country"],

0 commit comments

Comments
 (0)