diff --git a/apis/python/src/tiledbsoma/_dataframe.py b/apis/python/src/tiledbsoma/_dataframe.py index c380fd20c5..dee770a08d 100644 --- a/apis/python/src/tiledbsoma/_dataframe.py +++ b/apis/python/src/tiledbsoma/_dataframe.py @@ -520,8 +520,8 @@ def _upgrade_or_change_domain_helper( dim_schema = pa.schema(dim_schema_list) # Convert the user's tuple of low/high pairs into a dict keyed by index-column name. - new_domain_dict: Dict[str, Iterable[Any]] = {} - for i, dim_name in enumerate(dim_names): + new_domain_dict: Dict[str, Domain] = {} + for dim_name, new_dom in zip(dim_names, newdomain): # Domain can't be specified for strings (core constraint) so let them keystroke that easily. if ( dim_schema.field(dim_name).type @@ -531,11 +531,11 @@ def _upgrade_or_change_domain_helper( pa.binary(), pa.large_binary(), ] - and newdomain[i] is None + and new_dom is None ): new_domain_dict[dim_name] = ("", "") else: - new_domain_dict[dim_name] = tuple(newdomain[i]) # type: ignore + new_domain_dict[dim_name] = tuple(new_dom) # type: ignore # Return this as a pyarrow table. This has n columns where n is the number of # index columns, and two rows: one row for the low values and one for the high values.