Skip to content

Option to specify correlation type when calling df.pcorr() #337

@ozika

Description

@ozika

Hi!
I think it would be useful to be able to specify the correlation type when calling pcorr() directly as pandas method.

I suppose the only change would be this:
On line 952:

V = self.cov()  # Covariance matrix

to

 if method == "spearman":
    # Convert the data to rank, similar to R cov()
    V = data.rank(na_option="keep").cov()
else:
    V = data.cov()

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions