Help with switching axes

Hi, I had the structure imported from cif file and just want to switch the y and z-axis. I tried to apply a 90-degree rotation around the x-axis to switch the y and z directions, however, trying it several times still got the original crystal structure exported. Could someone help me with it? Thanks a lot. Following is the code I use. Thanks a lot for any help in advance.

parser = CifParser(filename)
cif = parser.get_structures(primitive=False)[0]
rotate = RotationTransformation(axis=(1,0,0), angle=90)
CifWriter(new).write_file(filename.replace(’.cif’, ‘_new.cif’))

You can use VASPKIT to achieve this (e.g., 405) Swap Axis of Lattice Vectors).