Skip to content

ENH: Tweaks to axis handling (esp for flex methods) #5304

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
3 tasks done
jtratner opened this issue Oct 23, 2013 · 6 comments
Closed
3 tasks done

ENH: Tweaks to axis handling (esp for flex methods) #5304

jtratner opened this issue Oct 23, 2013 · 6 comments
Assignees
Milestone

Comments

@jtratner
Copy link
Contributor

I think (2) may already be there, but I'm not sure and I want to check that.

This should be really trivial to do but it should make interactive playing around with frame and series a bit more intuitive. Don't think it makes sense for panel.

@ghost ghost assigned jtratner Oct 23, 2013
@jreback
Copy link
Contributor

jreback commented Oct 23, 2013

for 1) I think u can add it to the aliases map in core/generic (like major for major_axis in panel) and I think it will just work

@jtratner
Copy link
Contributor Author

Yep that's exactly what I was thinking.

@TomAugspurger
Copy link
Contributor

Would this be the correct place to handle synonyms for Panel axes as well? I've hit some methods that require axis to be an int instead of "items"/"major"/"minor". Panel.drop (which looks like its from generic) for example.

@jtratner
Copy link
Contributor Author

@TomAugspurger Can you list all the functions where you find that (pref with an example, even if it's just calls on one function)? (I also recall hitting a few that were doing that). That's probably because the function is getting the axis in the wrong way (i.e., it needs to use _get_axis rather than doing something like self.axes[axis], etc).

Panel functions should end up with 'items' for 0, 'major_axis' or 'major' for 1, 'minor_axis' or 'minor' for 2.

Panel._setup_axes(axes=['items', 'major_axis', 'minor_axis'],
                  info_axis=0,
                  stat_axis=1,
                  aliases={'major': 'major_axis',
                           'minor': 'minor_axis'},
                  slicers={'major_axis': 'index',
                           'minor_axis': 'columns'})

@jreback
Copy link
Contributor

jreback commented Oct 27, 2013

@TomAugspurger you can add to #5044, we'll make a top-level checklist for these kinds of things

@jreback
Copy link
Contributor

jreback commented Oct 27, 2013

@jtratner whatever else you want to put in 0.13 ok....pls bump otherwise

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