diff --git a/src/PyHyperScattering/SST1RSoXSDB.py b/src/PyHyperScattering/SST1RSoXSDB.py index b88d6d22..a964e4da 100644 --- a/src/PyHyperScattering/SST1RSoXSDB.py +++ b/src/PyHyperScattering/SST1RSoXSDB.py @@ -289,7 +289,7 @@ def searchCatalog( # For numeric entries, do Key equality if "numeric" in str(searchSeries[2]): reducedCatalog = reducedCatalog.search( - Key(searchSeries[0]) == float(searchSeries[1]) + Key(searchSeries.iloc[0]) == float(searchSeries.iloc[1]) ) else: # Build regex search string @@ -299,16 +299,16 @@ def searchCatalog( # Regex cheatsheet: # (?i) is case insensitive # ^_$ forces exact match to _, ^ anchors the start, $ anchors the end - if "case-insensitive" in str(searchSeries[2]): + if "case-insensitive" in str(searchSeries.iloc[2]): reg_prefix += "(?i)" - if "exact" in searchSeries[2]: + if "exact" in searchSeries.iloc[2]: reg_prefix += "^" reg_postfix += "$" - regexString = reg_prefix + str(searchSeries[1]) + reg_postfix + regexString = reg_prefix + str(searchSeries.iloc[1]) + reg_postfix # Search/reduce the catalog - reducedCatalog = reducedCatalog.search(Regex(searchSeries[0], regexString)) + reducedCatalog = reducedCatalog.search(Regex(searchSeries.iloc[0], regexString)) # If a match fails, notify the user which search parameter yielded 0 results if len(reducedCatalog) == 0: