Utils

Complete list of all util functions

Functions

.utils.generate_standings(df: pd.DataFrame, matches: str = 'All', xG: bool = False) pd.DataFrame

Returns a dataframe of league standings from given match results. xPts are calculated using the xGD of each match.

Parameters
  • df (pd.DataFrame) – Dataframe of match results

  • matches (str, optional) –

    type of matches to include in standings. Defaults to “All”.

    • All: all matches

    • Home: Only home matches

    • Away: Only away matches

  • xG (bool, optional) – whether to include expected calculations. Defaults to False.

Returns

Dataframe of league standings

Return type

DataFrame