Skip to content

BUG: DatetimeIndex(dt64_unsupported) raises #49292

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
jbrockmendel opened this issue Oct 24, 2022 · 0 comments · Fixed by #49875
Closed

BUG: DatetimeIndex(dt64_unsupported) raises #49292

jbrockmendel opened this issue Oct 24, 2022 · 0 comments · Fixed by #49875
Labels
Bug Constructors Series/DataFrame/Index/pd.array Constructors Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Oct 24, 2022

vals = [np.datetime64(1, "D")]

>>> pd.DatetimeIndex(vals, tz="US/Pacific")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pandas/core/indexes/datetimes.py", line 356, in __new__
    dtarr = DatetimeArray._from_sequence_not_strict(
  File "pandas/core/arrays/datetimes.py", line 329, in _from_sequence_not_strict
    subarr, tz, inferred_freq = _sequence_to_dt64ns(
  File "pandas/core/arrays/datetimes.py", line 2126, in _sequence_to_dt64ns
    data = tzconversion.tz_localize_to_utc(
  File "pandas/_libs/tslibs/tzconversion.pyx", line 239, in pandas._libs.tslibs.tzconversion.tz_localize_to_utc
    Localizer info = Localizer(tz, creso=creso)
  File "pandas/_libs/tslibs/tzconversion.pyx", line 100, in pandas._libs.tslibs.tzconversion.Localizer.__cinit__
    raise NotImplementedError(creso)
NotImplementedError: 4
@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member Constructors Series/DataFrame/Index/pd.array Constructors labels Oct 24, 2022
@jbrockmendel jbrockmendel mentioned this issue Nov 23, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Constructors Series/DataFrame/Index/pd.array Constructors Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant