hf1 = h5.File('f1.h5')
hf2 = h5.File('f2.h5')
hf1.create_dataset('val', data=35)
hf1.create_group('g1')
hf1.get('g1').create_dataset('val2', data='Thing')
hf1.flush()
h5.h5o.copy(hf1.id, 'g1', hf2.id, 'newg1')
h5.h5o.copy(hf1.id, 'val', hf2.id, 'newval')
list(hf2.values())
hf2.get('newval').value
list(hf2.get('newg1').values())
hf2.get('newg1').get('val2').value
Combining hdf5 files