-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue
Milestone
Description
import pandas as pd assert (pd.DataFrame(index=pd.Index([], name='x')) .reset_index(level=[]).index.name) is NoneThe root of the problem is in pandas.core.common._default_index:
def _default_index(n): from pandas.core.index import RangeIndex return RangeIndex(0, n, name=None)Probably, a new optional argument name can be introduced to _default_index and used in reset_index.
Metadata
Metadata
Assignees
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue