-
-
Notifications
You must be signed in to change notification settings - Fork 152
Index: ensure Index(DatetimeIndex) returns DatetimeIndex (fixes #1440) #1456
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
Changes from 3 commits
fac9e80
dbfe078
773fdfc
c5b0d15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from typing import assert_type | ||
|
||
| import pandas as pd | ||
|
|
||
| # GH#1440 – constructing Index from DatetimeIndex should return DatetimeIndex | ||
| data = pd.date_range("2022-01-01", "2022-01-03", freq="D") | ||
| idx = pd.Index(data, name="date") | ||
|
|
||
| assert_type(idx, pd.DatetimeIndex) | ||
Uh oh!
There was an error while loading. Please reload this page.