[/usr/local/lib/python3.10/dist-packages/ranx/data_structures/qrels.py](https://localhost:8080/#) in from_df(df, q_id_col, doc_id_col, score_col)
293 """
294 assert (
--> 295 df[q_id_col].dtype == "O"
296 ), "DataFrame scores column dtype must be `object` (string)"
297 assert (
AssertionError: DataFrame scores column dtype must be object (string)
**Expected behavior**
The assertion message should point to the correct column, in this case, it is the ID column that is of the wrong type. From inspecting the code, the assertion message is wrong when the document ID column is of the wrong type as well.
Describe the bug I'm using the library for the first time with a Pandas dataframe and ran into an exception that was misleading.
To Reproduce Steps to reproduce the behavior:
id
column is of typeint64
e.g.df['id'] = df.index + 1
AssertionError: DataFrame scores column dtype must be
object
(string)