Skip to content

Commit 124bc57

Browse files
jpizagnohcho3
andauthored
[ISSUE-10463] Add missing import in learning-to-rank tutorial (dmlc#10464)
* added 'sorted()' to qid, and added pandas import * Update learning_to_rank.rst --------- Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
1 parent 61ac8ee commit 124bc57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/tutorials/learning_to_rank.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Please note that, as of writing, there's no learning-to-rank interface in scikit
7171

7272
.. code-block:: python
7373
74+
import pandas as pd
7475
df = pd.DataFrame(X, columns=[str(i) for i in range(X.shape[1])])
7576
df["qid"] = qid[sorted_idx]
7677
ranker.fit(df, y) # No need to pass qid as a separate argument

0 commit comments

Comments
 (0)