Skip to content

Commit e1a010b

Browse files
Update set_sorted method docs to match Python (#98)
1 parent 5e3db5e commit e1a010b

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

lib/polars/data_frame.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -5101,12 +5101,16 @@ def merge_sorted(other, key)
51015101
lazy.merge_sorted(other.lazy, key).collect(_eager: true)
51025102
end
51035103

5104-
# Indicate that one or multiple columns are sorted.
5104+
# Flag a column as sorted.
5105+
#
5106+
# This can speed up future operations.
5107+
#
5108+
# Warning: This can lead to incorrect results if the data is NOT sorted! Use with care!
51055109
#
51065110
# @param column [Object]
5107-
# Columns that are sorted
5111+
# Column that is sorted.
51085112
# @param descending [Boolean]
5109-
# Whether the columns are sorted in descending order.
5113+
# Whether the column is sorted in descending order.
51105114
#
51115115
# @return [DataFrame]
51125116
def set_sorted(

lib/polars/lazy_frame.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -3347,12 +3347,16 @@ def merge_sorted(other, key)
33473347
_from_rbldf(_ldf.merge_sorted(other._ldf, key))
33483348
end
33493349

3350-
# Indicate that one or multiple columns are sorted.
3350+
# Flag a column as sorted.
3351+
#
3352+
# This can speed up future operations.
3353+
#
3354+
# Warning: This can lead to incorrect results if the data is NOT sorted! Use with care!
33513355
#
33523356
# @param column [Object]
3353-
# Columns that are sorted
3357+
# Column that is sorted.
33543358
# @param descending [Boolean]
3355-
# Whether the columns are sorted in descending order.
3359+
# Whether the column is sorted in descending order.
33563360
#
33573361
# @return [LazyFrame]
33583362
def set_sorted(

0 commit comments

Comments
 (0)