cvr.stats.CastVoteRecord_stats¶
- class cvr.stats.CastVoteRecord_stats¶
Bases:
objectExtra methods for CastVoteRecord class.
- __init__()¶
Methods
__init__()get_stats([keep_decimal_type, ...])Obtain the default statistics calculated by the CastVoteRecord object.
- get_stats(keep_decimal_type: bool = False, add_split_stats: bool = False, add_id_info: bool = True) List[DataFrame]¶
Obtain the default statistics calculated by the CastVoteRecord object. Statistics are returned in pandas dataframe object.
- Parameters:
keep_decimal_type (bool, optional) – Return the decimal class objects used by internal calculations rather than converting them to floats, defaults to False
add_split_stats (bool, optional) – Add extra statistics calculated for each category contained in split_fields columns passed to constructor, defaults to False
add_id_info (bool, optional) – Include contest ID details to returned dataframe, defaults to True
- Returns:
A list containing a single row dataframe with statistics organized in multiple columns. If split_fields are passed, then extra rows are added for each category in the split columns.
- Return type:
List[pd.DataFrame]