You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/user-guide/basics.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The first statement group:
54
54
# create a context
55
55
ctx = datafusion.SessionContext()
56
56
57
-
creates a :code:`SessionContext`, that is, the main interface for executing queries with DataFusion. It maintains the state
57
+
creates a :py:class:`~datafusion.context.SessionContext`, that is, the main interface for executing queries with DataFusion. It maintains the state
58
58
of the connection between a user and an instance of the DataFusion engine. Additionally it provides the following functionality:
59
59
60
60
- Create a DataFrame from a CSV or Parquet data source.
@@ -74,9 +74,9 @@ The second statement group creates a :code:`DataFrame`,
74
74
df = ctx.create_dataframe([[batch]])
75
75
76
76
A DataFrame refers to a (logical) set of rows that share the same column names, similar to a `Pandas DataFrame <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html>`_.
77
-
DataFrames are typically created by calling a method on :code:`SessionContext`, such as :code:`read_csv`, and can then be modified by
78
-
calling the transformation methods, such as :meth:`.DataFrame.filter`, :meth:`.DataFrame.select`, :meth:`.DataFrame.aggregate`,
79
-
and :meth:`.DataFrame.limit` to build up a query definition.
77
+
DataFrames are typically created by calling a method on :py:class:`~datafusion.context.SessionContext`, such as :code:`read_csv`, and can then be modified by
78
+
calling the transformation methods, such as :py:func:`~datafusion.dataframe.DataFrame.filter`, :py:func:`~datafusion.dataframe.DataFrame.select`, :py:func:`~datafusion.dataframe.DataFrame.aggregate`,
79
+
and :py:func:`~datafusion.dataframe.DataFrame.limit` to build up a query definition.
80
80
81
81
The third statement uses :code:`Expressions` to build up a query definition.
82
82
@@ -87,5 +87,5 @@ The third statement uses :code:`Expressions` to build up a query definition.
87
87
col("a") - col("b"),
88
88
)
89
89
90
-
Finally the :code:`collect` method converts the logical plan represented by the DataFrame into a physical plan and execute it,
91
-
collecting all results into a list of `RecordBatch <https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html>`_.
90
+
Finally the :py:func:`~datafusion.dataframe.DataFrame.collect` method converts the logical plan represented by the DataFrame into a physical plan and execute it,
91
+
collecting all results into a list of `RecordBatch <https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html>`_.
Copy file name to clipboardExpand all lines: docs/source/user-guide/common-operations/functions.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ We'll use the pokemon dataset in the following examples.
40
40
Mathematical
41
41
------------
42
42
43
-
DataFusion offers mathematical functions such as :func:`.pow` or :func:`.log`
43
+
DataFusion offers mathematical functions such as :py:func:`~datafusion.functions.pow` or :py:func:`~datafusion.functions.log`
44
44
45
45
.. ipython:: python
46
46
@@ -55,7 +55,7 @@ DataFusion offers mathematical functions such as :func:`.pow` or :func:`.log`
55
55
Conditional
56
56
-----------
57
57
58
-
There 3 conditional functions in DataFusion :func:`.coalesce`, :func:`.nullif` and :func:`.case` (not available in Python)
58
+
There 3 conditional functions in DataFusion :py:func:`~datafusion.functions.coalesce`, :py:func:`~datafusion.functions.nullif` and :py:func:`~datafusion.functions.case`.
59
59
60
60
.. ipython:: python
61
61
@@ -66,13 +66,13 @@ There 3 conditional functions in DataFusion :func:`.coalesce`, :func:`.nullif` a
66
66
Temporal
67
67
--------
68
68
69
-
For selecting the current time use :func:`.now`
69
+
For selecting the current time use :py:func:`~datafusion.functions.now`
70
70
71
71
.. ipython:: python
72
72
73
73
df.select(f.now())
74
74
75
-
Convert to timestamps using :func:`.to_timestamp`
75
+
Convert to timestamps using :py:func:`~datafusion.functions.to_timestamp`
76
76
77
77
.. ipython:: python
78
78
@@ -92,7 +92,7 @@ DataFusion offers a range of helpful options.
92
92
f.left(col('"Name"'), literal(4)).alias("code")
93
93
)
94
94
95
-
This also includes the functions for regular expressions like :func:`.regexp_replace` and :func:`.regexp_match`
95
+
This also includes the functions for regular expressions like :py:func:`~datafusion.functions.regexp_replace` and :py:func:`~datafusion.functions.regexp_match`
96
96
97
97
.. ipython:: python
98
98
@@ -105,7 +105,7 @@ This also includes the functions for regular expressions like :func:`.regexp_rep
105
105
Other
106
106
-----
107
107
108
-
The function :func:`.in_list` allows to check a column for the presence of multiple values:
108
+
The function :py:func:`~datafusion.functions.in_list` allows to check a column for the presence of multiple values:
0 commit comments