Skip to content

DataFrame.delevel improvements #476

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
wesm opened this issue Dec 12, 2011 · 2 comments
Closed

DataFrame.delevel improvements #476

wesm opened this issue Dec 12, 2011 · 2 comments

Comments

@wesm
Copy link
Member

wesm commented Dec 12, 2011

from @lodagro

Concerning the method name, DataFrame.delevel() is maybe too close to a MultiIndex. 
DataFrame.deindex() is more general, both are fine for me. And i have no problem to change either.

One little remark, for a MultiIndex default column names are inserted when needed, whereas if no MultiIndex is used, and no name - an exception is raised. Would it not be cleaner to do the same for both, either raise an exception if no names are set or enter default column names?
@wesm
Copy link
Member Author

wesm commented Dec 29, 2011

I took a hack at this. I don't think the default name matters all that much unless it's consistent-- it will be 'index' unless that's taken (relatively unlikely, but...) in which case it will be 'level_0'. I'll go with that unless you have strong feelings to the contrary

@wesm wesm closed this as completed Dec 29, 2011
@lodagro
Copy link
Contributor

lodagro commented Dec 29, 2011

I agree, default naming not so important, consistency counts.

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

2 participants