Merged
Conversation
This was
linked to
issues
Nov 3, 2025
Collaborator
Author
|
typing failures related to python 3.8? bump minimum python version? |
ir_measures/util.py
Outdated
| else: | ||
| pd = ir_measures.lazylibs.pandas() | ||
| return pd.DataFrame(self.as_namedtuple_iter()) | ||
| return pd.DataFrame(self.as_namedtuple_iter(), columns=['query_id', 'doc_id', 'relevance', 'iteration']) |
Collaborator
There was a problem hiding this comment.
What's this change for? Won't it mean that other data can't flow through automatically?
Collaborator
There was a problem hiding this comment.
Thanks! Then I think I’d prefer to only apply the default set of columns when it’s empty. Otherwise it’s not compatible with new features we’ve added related to custom inputs.
Collaborator
Author
There was a problem hiding this comment.
reasonable. I wasnt sure it was overriding column names from iter-tuples. If we can detect emptyness at that point, then I prefer your solution
Collaborator
There was a problem hiding this comment.
I pushed what I had envisioned -- does it look reasonable to you?
Ensure DataFrame is created with proper columns even when empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses: #75 #76 #77