File tree Expand file tree Collapse file tree
docs/source/user-guide/dataframe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ For such methods, you can pass column names directly:
142142
143143.. code-block :: python
144144
145- from datafusion import col, functions as f
145+ from datafusion import col, column, functions as f
146146
147147 df.sort(' id' )
148148 df.aggregate(' id' , [f.count(col(' value' ))])
@@ -151,11 +151,13 @@ The same operation can also be written with an explicit column expression:
151151
152152.. code-block :: python
153153
154- from datafusion import col, functions as f
154+ from datafusion import col, column, functions as f
155155
156156 df.sort(col(' id' ))
157157 df.aggregate(col(' id' ), [f.count(col(' value' ))])
158158
159+ Note that ``column() `` is an alias of ``col() ``, so you can use either name.
160+
159161Whenever an argument represents an expression—such as in
160162:py:meth: `~datafusion.DataFrame.filter ` or
161163:py:meth: `~datafusion.DataFrame.with_column `—use ``col() `` to reference columns
You can’t perform that action at this time.
0 commit comments