diff --git a/python/datafusion/functions.py b/python/datafusion/functions.py index 7ae59c000..89645104a 100644 --- a/python/datafusion/functions.py +++ b/python/datafusion/functions.py @@ -2268,6 +2268,11 @@ def first_value( ) -> Expr: """Returns the first value in a group of values. + .. note:: + This is an aggregate function. It must be used within + :py:meth:`~datafusion.dataframe.DataFrame.aggregate` and generally cannot be + used with :py:meth:`~datafusion.dataframe.DataFrame.select`. + This aggregate function will return the first value in the partition. If using the builder functions described in ref:`_aggregation` this function ignores