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

BUG: Index constructor does not set name when given a TimedeltaIndex as data #10025

Closed
shoyer opened this issue Apr 30, 2015 · 0 comments · Fixed by #10026
Closed

BUG: Index constructor does not set name when given a TimedeltaIndex as data #10025

shoyer opened this issue Apr 30, 2015 · 0 comments · Fixed by #10026
Labels
Bug Timedelta Timedelta data type
Milestone

Comments

@shoyer
Copy link
Member

shoyer commented Apr 30, 2015

In [46]: tdi = pd.timedelta_range(start=0, periods=4, freq='D')

In [47]: pd.Index(tdi, name='foo').name is None
Out[47]: True

In [48]: pd.Index(tdi.values, name='foo').name is None
Out[48]: False

Other index types seem to work fine:

In [51]: dti = pd.date_range(start='2000-01-01', periods=4, freq='D')

In [52]: pd.Index(dti, name='foo').name is None
Out[52]: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant