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 fast pairwise rolling correlation function #189

Closed
wesm opened this issue Oct 1, 2011 · 1 comment
Closed

Add fast pairwise rolling correlation function #189

wesm opened this issue Oct 1, 2011 · 1 comment
Milestone

Comments

@wesm
Copy link
Member

wesm commented Oct 1, 2011

@idrisr

def rolling_corr_pairwise(df, window):
   all_results = {}

   for col, left in df.iteritems():
       all_results[col] = col_results = {}
       for col, right in df.iteritems():
           col_results[col] = rolling_corr(left, right, window)

   return Panel(all_results)
@wesm
Copy link
Member Author

wesm commented Dec 12, 2011

added a slightly more efficient version of this. It's fairly speedy

@wesm wesm closed this as completed Dec 12, 2011
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
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

1 participant