MetaCSV objects support a copy method, which applies copy to all the contained information, including the variables, going so far as to create a new Variables object in the new MetaCSV object. But changing the newly copied object changes the original. This is because the final copy is not a deep-copy, and all content, like units and descriptions, are a second level deep.
I currently work around this by saying:
newcsv['variables']._data = copy.deepcopy(newcsv['variables']._data)
before updating information in the variables.
MetaCSV objects support a
copymethod, which appliescopyto all the contained information, including the variables, going so far as to create a new Variables object in the new MetaCSV object. But changing the newly copied object changes the original. This is because the final copy is not a deep-copy, and all content, like units and descriptions, are a second level deep.I currently work around this by saying:
before updating information in the variables.