detailed_bookings_by_timeframe¶
-
passengersim.summaries.segmentation_detail.detailed_bookings_by_timeframe(cnx: Database, *, scenario: str | None =
None, burn_samples: int =100) DataFrame[source]¶ Average bookings by carrier, orig, dest, booking class, and timeframe.
This query requires that the simulation was run while recording supporting details (i.e. with the bookings or fare flags set on Config.db.write_items).
- Parameters:
- cnx : Database¶
- scenario : str¶
- burn_samples : int, default 100¶
The bookings will be computed ignoring this many samples from the beginning of each trial. This argument is nominally ignored by this query unless from_fare_detail is true, although the simulator will have already ignored the burned samples when storing the data in the bookings table.
- Returns:
pandas.DataFrame – The resulting dataframe is indexed by trial, carrier, orig, dest, booking_class, and days_prior, and has these columns:
avg_sold: Average number of sales.
avg_business: Average number of sales to passengers in the business segment.
avg_leisure: Average number of sales to leisure passengers.