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 Panel method to rearrange axes #695

Closed
wesm opened this issue Jan 26, 2012 · 2 comments
Closed

Add Panel method to rearrange axes #695

wesm opened this issue Jan 26, 2012 · 2 comments
Milestone

Comments

@wesm
Copy link
Member

wesm commented Jan 26, 2012

No description provided.

@jreback
Copy link
Contributor

jreback commented Jan 27, 2012

e.g. right now p.swapaxes(axis1='items',axis2='minor').swapaxes(axis1='items',axis2='major') is required to reorder all axes
maybe: p.reorder_axes(items = 'minor', major = 'items', minor = 'major') would do the above; if you specify None for an axes should leave it alone?
admittedlty this is not that common, but for efficiency might be useful

use case was this:
df = DataFrame(fields x tickers)
p = Panel({ date : df }) -> items = date, major = tickers, minor = fields

as I use panels to represent items x time x tickers as a general rule

@wesm
Copy link
Member Author

wesm commented May 2, 2012

@changhiskhan can you add this, let's call it transpose:

p.transpose('major', 'items', 'minor')
p.transpose(1, 0, 2) # equivalently

@ghost ghost assigned changhiskhan May 3, 2012
changhiskhan pushed a commit that referenced this issue May 4, 2012
@wesm wesm closed this as completed May 7, 2012
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

3 participants