diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 9545733410fc..21cddd52a81e 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -6940,7 +6940,8 @@ def join_asof( This is similar to a left-join except that we match on nearest key rather than equal keys. - Both DataFrames must be sorted by the asof_join key. + Both DataFrames must be sorted by the `on` key (within each `by` group, if + specified). For each row in the left DataFrame: diff --git a/py-polars/polars/lazyframe/frame.py b/py-polars/polars/lazyframe/frame.py index de33fe1bdcfc..14895dcd782e 100644 --- a/py-polars/polars/lazyframe/frame.py +++ b/py-polars/polars/lazyframe/frame.py @@ -4274,7 +4274,8 @@ def join_asof( This is similar to a left-join except that we match on nearest key rather than equal keys. - Both DataFrames must be sorted by the join_asof key. + Both DataFrames must be sorted by the `on` key (within each `by` group, if + specified). For each row in the left DataFrame: