make_meta
over a Dask Dataframe returns a reference, not a new object
#10842
Labels
needs triage
Needs a response from a contributor
Describe the issue:
Reading the documentation of
make_meta
it states thatso my understanding is that a new object is returned. However, one can check that when running
make_meta
over a Dask Dataframe a reference to the dataframe meta is returned. Thus, if any change is made to the returned meta, the meta of the Dataframe is modified as well.Minimal Complete Verifiable Example:
Anything else we need to know?:
In my experience
make_meta
is very useful to obtain the current meta of a Dataframe and then update it with the necessary changes to provide appropriate meta information to methods such asmap_partitions
orassign
, so that Dask knows how you intend to change the structure of the Dataframe. But sincemake_meta
returns a reference it seems we are forced to make changes to a copy of this meta object, which is inconvenient. Is there any design reason for returning a reference instead of a copy?Environment:
The text was updated successfully, but these errors were encountered: