Plane.tocoordinatesystem rotation


I’am creating a solid along a path from a excel file.
I did it but I have a probelm with my coordinate system.
I would like to rotate the red axis to the vertical direction.

I tried the coordinatesystem.rotate with the X Y Z vectors but it seems to rotate all the axis in the same time…

Is there someone who can help me ?

Thank !