diff --git a/src/pingouin/correlation.py b/src/pingouin/correlation.py index 24e365f9..8edc964f 100644 --- a/src/pingouin/correlation.py +++ b/src/pingouin/correlation.py @@ -1113,9 +1113,9 @@ def replace_pval(x): if stars: # Replace p-values by stars - mat_upper = mat_upper.applymap(replace_pval) + mat_upper = mat_upper.map(replace_pval) else: - mat_upper = mat_upper.applymap(lambda x: ffp(x, precision=decimals)) + mat_upper = mat_upper.map(lambda x: ffp(x, precision=decimals)) # Replace upper triangle by p-values or n mat.to_numpy()[tif(mat, k=1)] = mat_upper.to_numpy()[tif(mat, k=1)] diff --git a/src/pingouin/pairwise.py b/src/pingouin/pairwise.py index 5a189d8d..36deae48 100644 --- a/src/pingouin/pairwise.py +++ b/src/pingouin/pairwise.py @@ -758,9 +758,9 @@ def replace_pval(x): if stars: # Replace p-values by stars - mat_upper = mat_upper.applymap(replace_pval) + mat_upper = mat_upper.map(replace_pval) else: - mat_upper = mat_upper.applymap(lambda x: ffp(x, precision=decimals)) + mat_upper = mat_upper.map(lambda x: ffp(x, precision=decimals)) # Replace upper triangle by p-values mat.to_numpy()[tif(mat, k=1)] = mat_upper.to_numpy()[tif(mat, k=1)]