Skip to content

Commit 7f112f7

Browse files
committed
reorder things and add targets
1 parent 5b4ac5b commit 7f112f7

File tree

5 files changed

+52
-26
lines changed

5 files changed

+52
-26
lines changed

docs/source/reference/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ API
77

88
verbs
99
operators/index
10-
functions
10+
targets
1111

1212
Table
1313
-----

docs/source/reference/functions.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/source/reference/operators/index.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
================
2-
Column Operators
3-
================
1+
=================
2+
Column Operations
3+
=================
44

55
.. toctree::
66
:maxdepth: 1
@@ -17,8 +17,25 @@ Column Operators
1717
sorting_markers
1818
horizontal_aggregation
1919

20+
2021
.. currentmodule:: pydiverse.transform
2122

2223
.. autoclass:: ColExpr
23-
:noindex:
24+
:no-index:
2425
:members: dtype
26+
27+
.. autosummary::
28+
:toctree: _generated/
29+
:template: autosummary/short_title.rst
30+
:nosignatures:
31+
32+
lit
33+
when
34+
35+
.. autosummary::
36+
:toctree: _generated/
37+
:template: autosummary/short_title.rst
38+
:nosignatures:
39+
40+
ColExpr.cast
41+
ColExpr.map

docs/source/reference/targets.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
=========================
2+
Backends / Export Targets
3+
=========================
4+
5+
.. currentmodule:: pydiverse.transform
6+
.. autosummary::
7+
:toctree: _generated/
8+
:nosignatures:
9+
:template: autosummary/short_title.rst
10+
11+
DuckDb
12+
Pandas
13+
Polars
14+
SqlAlchemy

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ def export(
142142
*,
143143
schema_overrides: dict[Col, Any] | None = None,
144144
) -> Pipeable:
145+
"""Convert a pydiverse.transform Table to a data frame.
146+
147+
Parameters
148+
----------
149+
The pydiverse.transform Table or column expression to be exported.
150+
151+
target
152+
Can currently be either a `Polars` or `Pandas` object. For polars, one can
153+
specify whether a DataFrame or LazyFrame is returned via the `lazy` kwarg.
154+
If `lazy=True`, no actual computations are performed, they just get stored in
155+
the LazyFrame.
156+
157+
Returns
158+
-------
159+
A polars or pandas DataFrame / LazyFrame or a series.
160+
"""
145161
if isinstance(data, ColExpr):
146162
# Find the common ancestor of all AST nodes of columns appearing in the
147163
# expression.

0 commit comments

Comments
 (0)