class_rename

passengersim.transforms.booking_classes.class_rename(cfg: Config) Config[source]

Rename booking classes in fares, classes, and carriers.

This will pad the numeric suffixes of booking classes to ensure they have the same number of digits. This is useful for ensuring consistent ordering and reporting of booking classes, especially when they are used in reports or visualizations that are typically sorted in lexicographic (generalized alphabetic) order.

Parameters:
cfg : Config

The configuration object containing fares, classes, and carriers.

Returns:

Config – The updated configuration object with zero-padded booking classes.