Skip to content

ENH: Setting diagonal to 1 in corr function #39224

Closed
@dhalpern

Description

@dhalpern

Is your feature request related to a problem?

I often want to use the corr function to also compute distances between columns (e.g. df.corr(method = spicy.spatial.distance.euclidean). However, I noticed that the .corr function always sets the i=j case to 1 (which is incorrect for the distance case) (see here).

Describe the solution you'd like

I realize using this function to compute distances is sort of a non-standard usage but is there any reason to hardcode it? Would it make more sense as a parameter that could be set?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions