Skip to content

Commit 10457ec

Browse files
authored
Merge pull request #299 from American-Institutes-for-Research/HEA-1139/AttributeError_Can_only_use_str_accessor_with_string_values
Address AttributeError-Can only use .str accessor with string values …
2 parents 42b67df + f19b299 commit 10457ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pipelines/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_index(search_text: str | list[str], data: pd.Series, offset: int = 0) ->
4646
search_text = [str(search_term).lower().strip() for search_term in search_text]
4747
# Convert the Series to a set of True/False values based on whether they match one of the
4848
# search_text values.
49-
matches = data.str.lower().str.strip().isin(search_text)
49+
matches = data.astype(str).str.lower().str.strip().isin(search_text)
5050
# If we don't find a match, return None
5151
if not matches.any():
5252
return None

0 commit comments

Comments
 (0)