DataFrame.delevel improvements · Issue #476 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
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?