diff --git a/idc_index/index.py b/idc_index/index.py index 5650398..362b843 100644 --- a/idc_index/index.py +++ b/idc_index/index.py @@ -567,9 +567,9 @@ def get_series_size(self, seriesInstanceUID): ValueError: If the `seriesInstanceUID` does not exist. """ - resp = self.index[["SeriesInstanceUID"] == seriesInstanceUID][ - "series_size_MB" - ].iloc[0] + resp = self._filter_dataframe_by_id( + "SeriesInstanceUID", self.index, seriesInstanceUID + )["series_size_MB"].iloc[0] return resp def get_patients(self, collection_id, outputFormat="dict"): @@ -2045,7 +2045,7 @@ def download_from_selection( if sopInstanceUID: if "instance_aws_url" not in result_df: result_df["instance_aws_url"] = ( - result_df["series_aws_url"].replace("/*", "/") + result_df["series_aws_url"].str.removesuffix("*") + result_df["crdc_instance_uuid"] + ".dcm" ) diff --git a/pyproject.toml b/pyproject.toml index 35a5b9e..48dd5af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ 'duckdb>=1.0.0,<2.0.0', "idc-index-data==24.2.2", "packaging", - "pandas<=2.2.4", + "pandas>=2.2.2,<4", "platformdirs", "psutil", "pyarrow",