Skip to content

Commit

Permalink
Fix Contains if cell values is not str. (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim committed May 23, 2024
1 parent 306a029 commit a2fc36a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/evidently/features/text_contains_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def feature_name(self) -> ColumnName:
)

def comparison(self, item: str, string: str):
if not isinstance(string, str):
return False
if self.case_sensitive:
return item in string
return item.casefold() in string.casefold()

0 comments on commit a2fc36a

Please sign in to comment.