Skip to content

Commit

Permalink
removes two warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacdonald committed Mar 23, 2023
1 parent 555f249 commit 717e843
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyterrier/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def convertDoc(text_row, meta_column):
if text_row is None:
text_row = ""
hashmap = HashMap()
for column, value in meta_column[1].iteritems():
for column, value in meta_column[1].items():
if value is None:
value = ""
hashmap.put(column, value)
Expand Down
2 changes: 1 addition & 1 deletion pyterrier/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def transform(self, topics_and_res):
rtr = rtr.drop(columns=['docno', 'pid']).rename(columns={"olddocno" : "docno"})

if self.agg == 'mean':
rtr = topics_and_res.groupby(['qid', 'olddocno']).mean()['score'].reset_index().rename(columns={'olddocno' : 'docno'})
rtr = topics_and_res.groupby(['qid', 'olddocno'])['score'].mean().reset_index().rename(columns={'olddocno' : 'docno'})
from .model import query_columns
#add query columns back
rtr = rtr.merge(topics_and_res[query_columns(topics_and_res)].drop_duplicates(), on='qid')
Expand Down

0 comments on commit 717e843

Please sign in to comment.