Skip to content

Commit 5cd1077

Browse files
committed
write about export
1 parent 7f112f7 commit 5cd1077

File tree

1 file changed

+17
-2
lines changed
  • src/pydiverse/transform/_internal/pipe

1 file changed

+17
-2
lines changed

src/pydiverse/transform/_internal/pipe/verbs.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,32 @@ def export(
146146
147147
Parameters
148148
----------
149-
The pydiverse.transform Table or column expression to be exported.
150-
151149
target
152150
Can currently be either a `Polars` or `Pandas` object. For polars, one can
153151
specify whether a DataFrame or LazyFrame is returned via the `lazy` kwarg.
154152
If `lazy=True`, no actual computations are performed, they just get stored in
155153
the LazyFrame.
156154
155+
schema_overrides
156+
A dictionary of columns to backend-specific data types. This controls which data
157+
types are used when writing to the backend. Because the data types are not
158+
constrained by pydiverse.transform's type system, this may sometimes be
159+
preferred over a `cast`.
160+
157161
Returns
158162
-------
159163
A polars or pandas DataFrame / LazyFrame or a series.
164+
165+
166+
Note
167+
----
168+
This verb can be used with a Table or column expression on the left. When applied to
169+
a column expression, all tables containing columns in the expression tree are
170+
gathered and the expression is exported with respect to the most recent table. This
171+
means that there has to be one column in the expression tree, whose table is a
172+
common ancestor of all others. If this is not the case, the export fails. Anonymous
173+
columns (`C`-columns) can be used in the expression and are interpreted with respect
174+
to this common ancestor table.
160175
"""
161176
if isinstance(data, ColExpr):
162177
# Find the common ancestor of all AST nodes of columns appearing in the

0 commit comments

Comments
 (0)