Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepcopy forgets manual changes to catalog dataframe #496

Open
ollie-bell opened this issue Aug 8, 2022 · 3 comments
Open

deepcopy forgets manual changes to catalog dataframe #496

ollie-bell opened this issue Aug 8, 2022 · 3 comments
Labels
bug Issues that present a reasonable conviction there is a reproducible bug.

Comments

@ollie-bell
Copy link

ollie-bell commented Aug 8, 2022

Description

Using aggregate=False in esm_datastore.to_dataset_dict() triggers a deepcopy of the object. For whatever reason, the deepcopy forgets any manual changes made to the dataframe by updating cat.esmcat._df (e.g. as recommended in the documentation here). I would expect manual changes made to the dataframe to be cascaded through the rest of the object.

What I Did

Replicate the tutorial here: https://intake-esm.readthedocs.io/en/latest/how-to/manipulate-catalog.html

Only change made was to add aggregate=False in the call tocat_subset.to_dataset_dict().

Now all 40 original assets are loaded instead of just the 8 intended assets after cat_subset.esmcat._df was modified.

Version information: output of intake_esm.show_versions()

Paste the output of intake_esm.show_versions() here:

import intake_esm

intake_esm.show_versions()

INSTALLED VERSIONS
------------------

cftime: 1.6.1
dask: 2022.7.1
fastprogress: 1.0.3
fsspec: 2022.7.1
gcsfs: 2022.7.1
intake: 0.6.5
intake_esm: 2021.8.17.post86
netCDF4: 1.6.0
pandas: 1.4.3
requests: 2.28.1
s3fs: 2022.7.1
xarray: 2022.6.0
zarr: 2.12.0
@andersy005 andersy005 added the bug Issues that present a reasonable conviction there is a reproducible bug. label Aug 8, 2022
@andersy005 andersy005 added this to the August 2022 Release milestone Aug 23, 2022
@andersy005 andersy005 removed this from the August 2022 Release milestone Sep 18, 2022
@Timh37
Copy link

Timh37 commented Feb 13, 2023

I'm also encountering this issue, any chance this has been fixed already?

@andersy005
Copy link
Member

@Timh37, which version of intake-esm are you using?

import intake_esm
intake_esm.show_versions()

@Timh37
Copy link

Timh37 commented Feb 14, 2023

@andersy005 :

I'm using the following:

image

which I think is the latest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that present a reasonable conviction there is a reproducible bug.
Projects
None yet
Development

No branches or pull requests

3 participants