Skip to content

add rank and rank correlation methods #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CRP opened this issue Dec 1, 2011 · 4 comments
Closed

add rank and rank correlation methods #428

CRP opened this issue Dec 1, 2011 · 4 comments
Milestone

Comments

@CRP
Copy link
Contributor

CRP commented Dec 1, 2011

I do not know what scope you have in mind for DataFrame methods, but rank and spearman correlation would sure be handy ;)

@wesm
Copy link
Member

wesm commented Dec 3, 2011

Do you mean rank in the sense of matrix rank? You make a good point so I just added kendall/spearman correlation to the corr methods, check it out

@CRP
Copy link
Contributor Author

CRP commented Dec 3, 2011

no, I do not mean matrix rank, but rank such as that provided in matlab by tiedrank. Actually, that function is a bit limited as there are many definitions of rank: http://en.wikipedia.org/wiki/Ranking

Generally, it would be nice to have some basic data transformation features built into pandas, such as rank, percentile rank, groupings (where each observation is assigned to a class, eg deciles) etc. I might try to implement some of these, though I am not sure my coding abilities are up to pandas' standards ;)

Another thing that might be useful is a isnan method that handles different datatypes transparently. Not sure what nan would be for non-float objects

@wesm
Copy link
Member

wesm commented Dec 11, 2011

There is already isnull and notnull which is an "isnan" for all data types

@wesm
Copy link
Member

wesm commented Dec 12, 2011

Well, your wish may have come true-- I implemented very fast rank functinos on Series and DataFrame (with proper tie breaking etc... a la scipy.stats.rankdata, except about 20x faster :) ). Will be useful to have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants