A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/194 below:

adding covariance to dataframe · Issue #194 · pandas-dev/pandas · GitHub

here is a sample implementation for dataframe.

def cov(self):
    """
    Compute pairwise covariance of columns

    Returns
    -------
    y : DataFrame
    """

    cols = self.columns
    std = np.diag(self.std())
    corr = self.corr()
    result = np.dot(np.dot(std, corr), std)
    return self._constructor(result , index=cols, columns=cols)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4