Skip to content
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

add rank and rank correlation methods #428

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

Comments

@CRP
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Dec 11, 2011

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

@wesm

This comment has been minimized.

Copy link
Member

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
2 participants
You can’t perform that action at this time.