↓ Skip to main content
All methods

pandas.DataFrame.devig

DataFrame method → DataFrame
Signature
DataFrame.devig()

Remove the vig from each row of a DataFrame of implied probabilities.

Each row is one set of vigged implied probabilities, and is rescaled so it adds up to 1.

Returns

pandas.DataFrame
Devigged implied probabilities as float decimals. Each row corresponds to a row in the input DataFrame.

See also

pandas.Series.devig
Remove the vig from a Series of implied probabilities.
pandas.DataFrame.vig
Calculate the vigorish (juice) of each row of a DataFrame of odds.
pandas.DataFrame.overround
Calculate the overround of each row of a DataFrame of odds.

Examples
#

import pandas as pd
import stakepd as spd   # importing stakepd adds these methods to pandas objects

Example:

implied_probabilities = pd.DataFrame({
            "A": [0.8, 0.5],
            "B": [0.3, 0.7]
        })
devigged_probs = implied_probabilities.devig()
print(devigged_probs)
Output:
          A         B
0  0.727273  0.272727
1  0.416667  0.583333

This method is also covered, alongside the rest of the module, in the overview guide.