code: def pcorr(self):
      """Partial correlation matrix (:py:class:`pandas.DataFrame` method).
  
      Returns
      -------
      pcormat : :py:class:`pandas.DataFrame`
          Partial correlation matrix.
  
      Notes
      -----
      This function calculates the pairwise partial correlations for each pair of
      variables in a :py:class:`pandas.DataFrame` given all the others. It has
      the same behavior as the pcor function in the
      `ppcor <https://cran.r-project.org/web/packages/ppcor/index.html>`_
      R package.
  
      Note that this function only returns the raw Pearson correlation
      coefficient. If you want to calculate the test statistic and p-values, or
      use more robust estimates of the correlation coefficient, please refer to
      the :py:func:`pingouin.pairwise_corr` or :py:func:`pingouin.partial_corr`
      functions.
  
      Examples
      --------
      >>> import pingouin as pg
      >>> data = pg.read_dataset('mediation')
      >>> data.pcorr().round(3)
                X      M      Y   Mbin   Ybin     W1     W2
      X     1.000  0.359  0.074 -0.019 -0.147 -0.148 -0.067
      M     0.359  1.000  0.555 -0.024 -0.112 -0.138 -0.176
      Y     0.074  0.555  1.000 -0.001  0.169  0.101  0.108
      Mbin -0.019 -0.024 -0.001  1.000 -0.080 -0.032 -0.040
      Ybin -0.147 -0.112  0.169 -0.080  1.000 -0.000 -0.140
      W1   -0.148 -0.138  0.101 -0.032 -0.000  1.000 -0.394
      W2   -0.067 -0.176  0.108 -0.040 -0.140 -0.394  1.000
  
      On a subset of columns
  
      >>> data[['X', 'Y', 'M']].pcorr()
                X         Y         M
      X  1.000000  0.036649  0.412804
      Y  0.036649  1.000000  0.540140
      M  0.412804  0.540140  1.000000
      """
      V = self.cov(numeric_only=True)  # Covariance matrix
      Vi = np.linalg.pinv(
          V, hermitian=True
      )  # Inverse covariance matrix
      D = np.diag(np.sqrt(1 / np.diag(Vi)))
      pcor = -1 * (D @ Vi @ D)  # Partial correlation matrix
      pcor[np.diag_indices_from(pcor)] = 1
      return pd.DataFrame(pcor, index=V.index, columns=V.columns)
  
imports: import warnings
  import numpy
  import pandas
  import pandas_flavor
  from scipy.spatial.distance import pdist, squareform
  from scipy.stats import pearsonr, spearmanr, kendalltau
  from pingouin.config import options
  from pingouin.power import power_corr
  from pingouin.multicomp import multicomp
  from pingouin.effsize import compute_esci
  from pingouin.utils import remove_na, _perm_pval, _postprocess_dataframe
  from pingouin.bayesian import bayesfactor_pearson
label_desc: Use image node_id 9 for calling a global function with example usage: pcorr() and returns: pd