Hi,
Is there an easy way to rename a dataset? I have a few hdf5 files where I would like to rename the datasets and change the attributes to be more descriptive. I know I could simply copy the internal data, create a new dataset, and delete the old one. But I thought there might be a built-in method of some sort to do this more easily.
Jonathan Tu
There's no specific "rename" function, but it's easy to do. Suppose
you have a dataset named "one" and want to rename it to "two":
>>> myfile["two"] = myfile["one"]
>>> del myfile["one"]
This shouldn't result in any copying of data, as only the names of the
datasets are updated in the file.
Andrew