boolean_stats
boolean_stats ¤
BooleanStatistics ¤
BooleanStatistics(
dataframe: DataFrame, column_name: str = "systime"
)
Bases: Base
Provides class methods to calculate statistics on a boolean column in a pandas DataFrame.
count_true
classmethod
¤
count_true(
dataframe: DataFrame, column_name: str = "value_bool"
) -> int
Returns the count of True values in the boolean column.
count_false
classmethod
¤
count_false(
dataframe: DataFrame, column_name: str = "value_bool"
) -> int
Returns the count of False values in the boolean column.
count_null
classmethod
¤
count_null(
dataframe: DataFrame, column_name: str = "value_bool"
) -> int
Returns the count of null (NaN) values in the boolean column.
count_not_null
classmethod
¤
count_not_null(
dataframe: DataFrame, column_name: str = "value_bool"
) -> int
Returns the count of non-null (True or False) values in the boolean column.
true_percentage
classmethod
¤
true_percentage(
dataframe: DataFrame, column_name: str = "value_bool"
) -> float
Returns the percentage of True values in the boolean column.
false_percentage
classmethod
¤
false_percentage(
dataframe: DataFrame, column_name: str = "value_bool"
) -> float
Returns the percentage of False values in the boolean column.
mode
classmethod
¤
mode(dataframe: DataFrame, column_name: str) -> bool
Returns the mode (most common value) of the specified boolean column.
is_balanced
classmethod
¤
is_balanced(dataframe: DataFrame, column_name: str) -> bool
Indicates if the distribution is balanced (50% True and False) in the specified boolean column.
summary_as_dict
classmethod
¤
summary_as_dict(
dataframe: DataFrame, column_name: str
) -> Dict[str, Union[int, float, bool]]
Returns a summary of boolean statistics for the specified column as a dictionary.
summary_as_dataframe
classmethod
¤
summary_as_dataframe(
dataframe: DataFrame, column_name: str
) -> pd.DataFrame
Returns a summary of boolean statistics for the specified column as a DataFrame.