↓ Skip to main content

pandas.DataFrame.overround

71 words·1 min
pandas.DataFrame.overround(odds_type='implied_probability')

Calculate the overrounds of a DataFrame of odds.

Parameters:

  • odds_type (str, optional): Type of odds provided. Supported values are 'decimal', 'fractional', 'american', and 'implied_probability'. Default is 'implied_probability'.

Returns:

  • pandas.Series: Series of overrounds as decimals corresponding to the row indexes of the input DataFrame.

Example:

import pandas as pd
import stakepd as spd

implied_odds = pd.DataFrame({"A": [0.8, 0.5], "B": [0.3, 0.7]})
overround_values = implied_odds.overround(odds_type='implied_probability')
print(overround_values)
0    0.1
1    0.2
dtype: float64