scikit_posthocs.sign_table
- scikit_posthocs.sign_table(p_values: List | ndarray | DataFrame, lower: bool = True, upper: bool = True) DataFrame
Significance table.
Returns table that can be used in a publication. P values are replaced with asterisks: * - p < 0.05, ** - p < 0.01, *** - p < 0.001.
- Parameters:
p_values (Union[List, np.ndarray, DataFrame]) – Any object exposing the array interface and containing p values.
lower (bool) – Defines whether to return the lower triangle.
upper (bool) – Defines whether to return the upper triangle.
- Returns:
result – P values masked with asterisks.
- Return type:
pandas.DataFrame
Examples
>>> import numpy as np >>> import scikit_posthocs as ph >>> p_values = np.array([[-1. , 0.00119517, 0.00278329], ... [ 0.00119517, -1. , 0.18672227], ... [ 0.00278329, 0.18672227, -1. ]]) >>> ph.sign_table(p_values).loc[0, 1] '**'