Skip to content

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Has one test that will fail until #49050.

@mroeschke mroeschke added Datetime Datetime data dtype Constructors Series/DataFrame/Index/pd.array Constructors Non-Nano datetime64/timedelta64 with non-nanosecond resolution labels Oct 12, 2022
data = astype_overflowsafe(data, dtype=DT64NS_DTYPE)
new_dtype = data.dtype
data_unit = get_unit_from_dtype(new_dtype)
if not is_supported_unit(data_unit):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it generally not possible to get a dt64tz type with an unsupported unit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

@mroeschke mroeschke added this to the 2.0 milestone Oct 18, 2022
@mroeschke mroeschke merged commit fbff58f into pandas-dev:main Oct 18, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-sequence_to_dt64ns-3 branch October 18, 2022 18:39
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…9058)

* API: retain non-nano dtype in DatetimeArray constructor

* update test

* un-xfail

* un-xfail

* un-xfail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors Datetime Datetime data dtype Non-Nano datetime64/timedelta64 with non-nanosecond resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants