fare_class_mix¶
-
passengersim.database.common_queries.fare_class_mix(cnx: Database, scenario: str, burn_samples: int =
100) DataFrame[source]¶ Fare class mix by carrier.
This query requires that the simulation was run while recording final fare details (i.e. with the fare or fare_final flags set on Config.db.write_items).
- Parameters:
- Returns:
pandas.DataFrame – The resulting dataframe is indexed by carrier and booking_class, and has these columns:
avg_sold: Average number of sales in this booking class.
- avg_revenue: Average total revenue earned from customers booking in
this booking class.
- avg_price: Average price per ticket from customers booking in this
booking class.