Skip to main content
Rate the example book with the example program:
rate returns one row per submission, in book order. premium is the policy’s annual premium, as an exact Decimal. Rating runs on your machine, and your book stays there.

Count the unrated submissions

Each submission keeps its row. An unrated submission has a status other than succeeded, a reason, and NaN as its premium:
Keep the unrated submissions and their reasons in each exhibit. Results describes each column.

Summarize by your own segments

Join the results to the book by submission_id, and summarize in pandas:
mean skips the NaN premiums, so each mean describes the rated policies of its region.

Rate by vehicle

Pass by="vehicles" for one row per vehicle, with the premiums the rater returns for that vehicle:

Explain a premium

explain lists each input the rater received, then each value it calculated, in order:
Each row carries submission_id, so the table merges with the book and with the rows of rate. The calculation rows show each factor and premium to the total of $2,636.