aggregate_spill

passengersim.summaries.carriers.aggregate_spill(summaries: list[SimTabCarriers]) → DataFrame | None | Exception[source]

Add spill counts across trials, matching rows by carrier and booking class.

Row positions can’t be used to line up the trials, because a first-choice class seen in only some trials shifts every row after it. Adding by position would also concatenate the text labels instead of keeping them as keys.

Parameters:
summaries : list[SimTabCarriers]

The trial summaries to combine.

Returns:

pandas.DataFrame or None or Exception – One row for each carrier and booking class seen in any trial, in order of first appearance. Returns None if no trial has spill data, or the stored exception if a trial failed to produce the table.