Error in Atlas-level-integration-of-lung-data Tutorial

Hello,

I am running though the tutorial in the SCANVI docs for Atlas level Lung Data. I’ve create the environment using conda/mamba and I am running this on MacOS Ventura 13.4.

I downloaded the example dataset and have been running the tutorial ‘as-is’, but I am running into an error in scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch") where I get an IndexError: index (15132) out of range message.

Any help in resolving this error would be greatly appreciated!

Thanks,

Jenny

Full traceback:

IndexError                                Traceback (most recent call last)
/Users/jsmi26/local_repos/mack_d_2023.04.13_ipsc_neuromuscular_scrnaseq/references/scanvi/harmonization.ipynb Cell 15 line 2
      1 print(adata)
----> 2 scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scvi/model/_scvi.py:211, in SCVI.setup_anndata(cls, adata, layer, batch_key, labels_key, size_factor_key, categorical_covariate_keys, continuous_covariate_keys, **kwargs)
    207     anndata_fields += cls._get_fields_for_adata_minification(adata_minify_type)
    208 adata_manager = AnnDataManager(
    209     fields=anndata_fields, setup_method_args=setup_method_args
    210 )
--> 211 adata_manager.register_fields(adata, **kwargs)
    212 cls.register_manager(adata_manager)

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scvi/data/_manager.py:181, in AnnDataManager.register_fields(self, adata, source_registry, **transfer_kwargs)
    178 self._validate_anndata_object(adata)
    180 for field in self.fields:
--> 181     self._add_field(
    182         field=field,
    183         adata=adata,
    184         source_registry=source_registry,
    185         **transfer_kwargs,
    186     )
    188 # Save arguments for register_fields.
    189 self._source_registry = deepcopy(source_registry)

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scvi/data/_manager.py:224, in AnnDataManager._add_field(self, field, adata, source_registry, **transfer_kwargs)
    216         field_registry[_constants._STATE_REGISTRY_KEY] = field.transfer_field(
    217             source_registry[_constants._FIELD_REGISTRIES_KEY][
    218                 field.registry_key
   (...)
    221             **transfer_kwargs,
    222         )
    223     else:
--> 224         field_registry[_constants._STATE_REGISTRY_KEY] = field.register_field(
    225             adata
    226         )
    227 # Compute and set summary stats for the given field.
    228 state_registry = field_registry[_constants._STATE_REGISTRY_KEY]

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scvi/data/fields/_dataframe_field.py:189, in CategoricalDataFrameField.register_field(self, adata)
    186     self._setup_default_attr(adata)
    188 super().register_field(adata)
--> 189 categorical_mapping = _make_column_categorical(
    190     getattr(adata, self.attr_name),
    191     self._original_attr_key,
    192     self.attr_key,
    193 )
    194 return {
    195     self.CATEGORICAL_MAPPING_KEY: categorical_mapping,
    196     self.ORIGINAL_ATTR_KEY: self._original_attr_key,
    197 }

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scvi/data/_utils.py:177, in _make_column_categorical(df, column_key, alternate_column_key, categorical_dtype)
    172     received_categories = df[column_key].astype("category").cat.categories
    173     raise ValueError(
    174         'Making .obs["{}"] categorical failed. Expected categories: {}. '
    175         "Received categories: {}. ".format(column_key, mapping, received_categories)
    176     )
--> 177 df[alternate_column_key] = codes
    179 # make sure each category contains enough cells
    180 if np.min(counts) < 3:

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/anndata/_core/views.py:78, in _SetItemMixin.__setitem__(self, idx, value)
     71 else:
     72     warnings.warn(
     73         f"Trying to modify attribute `.{self._view_args.attrname}` of view, "
     74         "initializing view as actual.",
     75         ImplicitModificationWarning,
     76         stacklevel=2,
     77     )
---> 78     with view_update(*self._view_args) as container:
     79         container[idx] = value

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/contextlib.py:135, in _GeneratorContextManager.__enter__(self)
    133 del self.args, self.kwds, self.func
    134 try:
--> 135     return next(self.gen)
    136 except StopIteration:
    137     raise RuntimeError("generator didn't yield") from None

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/anndata/_core/views.py:52, in view_update(adata_view, attr_name, keys)
     32 @contextmanager
     33 def view_update(adata_view: AnnData, attr_name: str, keys: tuple[str, ...]):
     34     """Context manager for updating a view of an AnnData object.
     35 
     36     Contains logic for "actualizing" a view. Yields the object to be modified in-place.
   (...)
     50     `adata.attr[key1][key2][keyn]...`
     51     """
---> 52     new = adata_view.copy()
     53     attr = getattr(new, attr_name)
     54     container = reduce(lambda d, k: d[k], keys, attr)

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/anndata/_core/anndata.py:1583, in AnnData.copy(self, filename)
   1576 if not self.isbacked:
   1577     if self.is_view and self._has_X():
   1578         # TODO: How do I unambiguously check if this is a copy?
   1579         # Subsetting this way means we don’t have to have a view type
   1580         # defined for the matrix, which is needed for some of the
   1581         # current distributed backend. Specifically Dask.
   1582         return self._mutated_copy(
-> 1583             X=_subset(self._adata_ref.X, (self._oidx, self._vidx)).copy()
   1584         )
   1585     else:
   1586         return self._mutated_copy()

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/functools.py:878, in singledispatch.<locals>.wrapper(*args, **kw)
    874 if not args:
    875     raise TypeError(f'{funcname} requires at least '
    876                     '1 positional argument')
--> 878 return dispatch(args[0].__class__)(*args, **kw)

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/anndata/_core/index.py:166, in _subset_spmatrix(a, subset_idx)
    164 if len(subset_idx) > 1 and all(isinstance(x, cabc.Iterable) for x in subset_idx):
    165     subset_idx = (subset_idx[0].reshape(-1, 1), *subset_idx[1:])
--> 166 return a[subset_idx]

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scipy/sparse/_index.py:44, in IndexMixin.__getitem__(self, key)
     43 def __getitem__(self, key):
---> 44     row, col = self._validate_indices(key)
     46     # Dispatch to specialized methods.
     47     if isinstance(row, INT_TYPES):

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scipy/sparse/_index.py:165, in IndexMixin._validate_indices(self, key)
    163         col += N
    164 elif not isinstance(col, slice):
--> 165     col = self._asindices(col, N)
    167 return row, col

File ~/opt/mambaforge/envs/scanvi/lib/python3.10/site-packages/scipy/sparse/_index.py:188, in IndexMixin._asindices(self, idx, length)
    186 max_indx = x.max()
    187 if max_indx >= length:
--> 188     raise IndexError('index (%d) out of range' % max_indx)
    190 min_indx = x.min()
    191 if min_indx < 0:

IndexError: index (15132) out of range

The conda environment:

# packages in environment at /Users/jsmi26/opt/mambaforge/envs/scanvi:
#
# Name                    Version                   Build  Channel
absl-py                   2.0.0              pyhd8ed1ab_0    conda-forge
anndata                   0.10.2             pyhd8ed1ab_0    conda-forge
annotated-types           0.6.0              pyhd8ed1ab_0    conda-forge
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
array-api-compat          1.4                pyhd8ed1ab_0    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
backoff                   2.2.1              pyhd8ed1ab_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
blessed                   1.19.1             pyhe4f9e05_2    conda-forge
brotli                    1.1.0                hb547adb_1    conda-forge
brotli-bin                1.1.0                hb547adb_1    conda-forge
brotli-python             1.1.0           py310h1253130_1    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
c-ares                    1.20.1               h93a5062_1    conda-forge
ca-certificates           2023.7.22            hf0a4a13_0    conda-forge
cachecontrol              0.13.1             pyhd8ed1ab_0    conda-forge
cachecontrol-with-filecache 0.13.1             pyhd8ed1ab_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310hdcd7c05_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
chex                      0.1.83             pyhd8ed1ab_0    conda-forge
cleo                      2.1.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
contextlib2               21.6.0             pyhd8ed1ab_0    conda-forge
contourpy                 1.1.1           py310h38f39d4_1    conda-forge
crashtest                 0.4.1              pyhd8ed1ab_0    conda-forge
croniter                  1.4.1              pyhd8ed1ab_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dateutils                 0.6.12                     py_0    conda-forge
debugpy                   1.8.0           py310h1253130_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
deepdiff                  6.6.1              pyhd8ed1ab_0    conda-forge
distlib                   0.3.7              pyhd8ed1ab_0    conda-forge
dm-tree                   0.1.8           py310hf4e154e_0    conda-forge
docrep                    0.3.2              pyh44b312d_0    conda-forge
dulwich                   0.21.6          py310hd125d64_2    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fastapi                   0.104.1            pyhd8ed1ab_0    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
flax                      0.6.1              pyhd8ed1ab_1    conda-forge
fonttools                 4.43.1          py310hd125d64_0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
fsspec                    2023.10.0          pyhca7485f_0    conda-forge
gmp                       6.2.1                h9f76cd9_0    conda-forge
gmpy2                     2.1.2           py310h2e6cad2_1    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h5py                      3.10.0          nompi_py310h428b110_100    conda-forge
hdf5                      1.14.2          nompi_h3aba7b3_100    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_metadata        6.8.0                hd8ed1ab_0    conda-forge
importlib_resources       6.1.0              pyhd8ed1ab_0    conda-forge
inquirer                  3.1.3              pyhd8ed1ab_0    conda-forge
ipykernel                 6.26.0             pyh3cd1d5f_0    conda-forge
ipython                   8.17.2             pyh31c8845_0    conda-forge
itsdangerous              2.1.2              pyhd8ed1ab_0    conda-forge
jaraco.classes            3.3.0              pyhd8ed1ab_0    conda-forge
jax                       0.4.13             pyhd8ed1ab_0    conda-forge
jaxlib                    0.4.12          cpu_py310h07108a6_1    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.3.2              pyhd8ed1ab_0    conda-forge
jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
jupyter_client            8.5.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.5.0           py310hbe9552e_0    conda-forge
keyring                   24.2.0          py310hbe9552e_1    conda-forge
kiwisolver                1.4.5           py310h38f39d4_1    conda-forge
krb5                      1.21.2               h92f50d5_0    conda-forge
lcms2                     2.15                 hf2736f0_3    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libabseil                 20230125.3      cxx17_h13dd4ca_0    conda-forge
libaec                    1.1.2                h13dd4ca_1    conda-forge
libblas                   3.9.0           19_osxarm64_openblas    conda-forge
libbrotlicommon           1.1.0                hb547adb_1    conda-forge
libbrotlidec              1.1.0                hb547adb_1    conda-forge
libbrotlienc              1.1.0                hb547adb_1    conda-forge
libcblas                  3.9.0           19_osxarm64_openblas    conda-forge
libcurl                   8.4.0                h2d989ff_0    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libdeflate                1.19                 hb547adb_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h642e427_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_1    conda-forge
libgfortran5              13.2.0               hf226fd6_1    conda-forge
libgrpc                   1.56.2               h9075ed4_1    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblapack                 3.9.0           19_osxarm64_openblas    conda-forge
libllvm14                 14.0.6               hd1a9a77_4    conda-forge
libnghttp2                1.55.1               h2b02ca0_0    conda-forge
libopenblas               0.3.24          openmp_hd76b1f2_0    conda-forge
libpng                    1.6.39               h76d750c_0    conda-forge
libprotobuf               4.23.3               hf32f9b9_1    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.44.0               h091b4b1_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libtiff                   4.6.0                ha8a6c65_2    conda-forge
libuv                     1.46.0               hb547adb_0    conda-forge
libwebp-base              1.3.2                hb547adb_0    conda-forge
libxcb                    1.15                 hf346824_0    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
lightning                 2.0.9.post0        pyhd8ed1ab_0    conda-forge
lightning-cloud           0.5.39             pyhd8ed1ab_0    conda-forge
lightning-utilities       0.9.0              pyhd8ed1ab_0    conda-forge
llvm-openmp               17.0.4               hcd81f8e_0    conda-forge
llvmlite                  0.40.1          py310h95b248a_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py310h2aa6e3c_1    conda-forge
matplotlib-base           3.8.0           py310h9d2df84_2    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mdurl                     0.1.0              pyhd8ed1ab_0    conda-forge
ml-collections            0.1.1              pyhd8ed1ab_0    conda-forge
ml_dtypes                 0.3.1           py310h6e3cc31_2    conda-forge
more-itertools            10.1.0             pyhd8ed1ab_0    conda-forge
mpc                       1.3.1                h91ba8db_0    conda-forge
mpfr                      4.2.1                h9546428_0    conda-forge
mpmath                    1.3.0              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.6           py310h38f39d4_0    conda-forge
mudata                    0.2.3              pyhd8ed1ab_0    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
natsort                   8.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.4                  h463b476_2    conda-forge
nest-asyncio              1.5.8              pyhd8ed1ab_0    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
nomkl                     1.0                  h5ca1d4c_0    conda-forge
numba                     0.57.1          py310hb9b3264_0    conda-forge
numpy                     1.24.4          py310haa1e00c_0    conda-forge
numpyro                   0.13.2             pyhd8ed1ab_0    conda-forge
openjpeg                  2.5.0                h4c1507b_3    conda-forge
openpyxl                  3.1.2           py310h2aa6e3c_1    conda-forge
openssl                   3.1.4                h0d3ecfb_0    conda-forge
opt_einsum                3.3.0              pyhc1e730c_2    conda-forge
optax                     0.1.7              pyhd8ed1ab_0    conda-forge
ordered-set               4.1.0              pyhd8ed1ab_0    conda-forge
orjson                    3.9.10          py310h76820b8_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.1.2           py310h6e3cc31_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
patsy                     0.5.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.1.0          py310hfae7ebd_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pkginfo                   1.9.6              pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              3.11.0             pyhd8ed1ab_0    conda-forge
poetry                    1.6.1           osx_pyh534df25_0    conda-forge
poetry-core               1.7.0              pyhd8ed1ab_0    conda-forge
poetry-plugin-export      1.6.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
psutil                    5.9.5           py310h2aa6e3c_1    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  2.1.1              pyhd8ed1ab_0    conda-forge
pydantic-core             2.4.0           py310had9acf8_0    conda-forge
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_0    conda-forge
pynndescent               0.5.10             pyh1a96a4e_0    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pyproject_hooks           1.0.0              pyhd8ed1ab_0    conda-forge
pyro-api                  0.1.2              pyhd8ed1ab_0    conda-forge
pyro-ppl                  1.8.6              pyhd8ed1ab_0    conda-forge
pyrsistent                0.20.0          py310hd125d64_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.0          h43b31ca_3_cpython    conda-forge
python-build              0.10.0             pyhd8ed1ab_1    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-editor             1.0.4                      py_0    conda-forge
python-installer          0.7.0              pyhd8ed1ab_0    conda-forge
python-multipart          0.0.6              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge
pytorch                   2.0.0           cpu_generic_py310h11b5426_1    conda-forge
pytorch-lightning         2.1.0              pyhd8ed1ab_0    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py310h2aa6e3c_1    conda-forge
pyzmq                     25.1.1          py310h7e65269_2    conda-forge
rapidfuzz                 3.4.0           py310hd5a4765_0    conda-forge
re2                       2023.03.02           hc5e2d97_0    conda-forge
readchar                  4.0.5              pyhd8ed1ab_0    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
requests-toolbelt         1.0.0              pyhd8ed1ab_0    conda-forge
rich                      13.6.0             pyhd8ed1ab_0    conda-forge
scanpy                    1.9.5              pyhd8ed1ab_0    conda-forge
scikit-learn              1.3.2           py310h417b086_1    conda-forge
scikit-misc               0.3.0                    pypi_0    pypi
scipy                     1.11.3          py310hd1cfc7d_1    conda-forge
scvi-tools                1.0.4              pyhd8ed1ab_0    conda-forge
seaborn                   0.13.0               hd8ed1ab_0    conda-forge
seaborn-base              0.13.0             pyhd8ed1ab_0    conda-forge
session-info              1.0.0              pyhd8ed1ab_0    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sleef                     3.5.1                h156473d_2    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sparse                    0.14.0             pyhd8ed1ab_0    conda-forge
sqlite                    3.44.0               hf2abe2d_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
starlette                 0.27.0             pyhd8ed1ab_0    conda-forge
starsessions              1.3.0              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.0          py310h50ce23c_2    conda-forge
stdlib-list               0.8.0              pyhd8ed1ab_0    conda-forge
sympy                     1.12            pypyh9d50eac_103    conda-forge
tbb                       2021.10.0            h1995070_2    conda-forge
threadpoolctl             3.2.0              pyha21a80b_0    conda-forge
tk                        8.6.13               hb31c410_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.1             pyha770c72_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
torchmetrics              1.2.0              pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py310h2aa6e3c_1    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.13.0             pyhd8ed1ab_0    conda-forge
trove-classifiers         2023.10.18         pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.8.19.14          pyhd8ed1ab_0    conda-forge
typing-extensions         4.8.0                hd8ed1ab_0    conda-forge
typing_extensions         4.8.0              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
umap-learn                0.5.4           py310hbe9552e_0    conda-forge
unicodedata2              15.1.0          py310h2aa6e3c_0    conda-forge
urllib3                   2.0.7              pyhd8ed1ab_0    conda-forge
uvicorn                   0.23.2          py310hbe9552e_1    conda-forge
virtualenv                20.24.6            pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.9              pyhd8ed1ab_0    conda-forge
websocket-client          1.6.4              pyhd8ed1ab_0    conda-forge
websockets                12.0            py310hd125d64_0    conda-forge
wheel                     0.41.3             pyhd8ed1ab_0    conda-forge
xarray                    2023.10.1          pyhd8ed1ab_0    conda-forge
xattr                     0.10.1          py310h2aa6e3c_1    conda-forge
xlrd                      1.2.0              pyh9f0ad1d_1    conda-forge
xorg-libxau               1.0.11               hb547adb_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.5                h965bd2d_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstd                      1.5.5                h4f39d0f_0    conda-forge

Hi, we’ve had some issues with Pandas 2.1.2. Not sure exactly if this is the source of your issue, but could you try installing Pandas != 2.1.2 and check if the issue persists? Thanks

I was able to reproduce your error by installing Pandas 2.1.2 locally, but the error does not reproduce on Pandas 2.1.0. You can downgrade with pip install -U pandas==2.1.0.

Wonderful, thank you! I will try it out now and let you know if it resolved the issue.

I updated my conda environment with pandas=2.1.0 and everything works now. Thank you!