Skip to content

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Jan 16, 2023

@MarcoGorelli MarcoGorelli added the Non-Nano datetime64/timedelta64 with non-nanosecond resolution label Jan 16, 2023
@MarcoGorelli MarcoGorelli marked this pull request as ready for review January 16, 2023 13:00
if inferred_freq is None and freq is not None:
# this condition precludes `freq_infer`
cls._validate_frequency(result, freq, ambiguous=ambiguous)
cls._validate_frequency(result, freq, ambiguous=ambiguous, unit=result.unit)
Copy link
Member

Choose a reason for hiding this comment

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

i have a branch where i added unit=index.unit inside _validate_frequency. any reason to that here instead of there?

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry which branch?

Copy link
Member

Choose a reason for hiding this comment

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

Just a local branch

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah that works too

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@jbrockmendel jbrockmendel merged commit f941b76 into pandas-dev:main Jan 17, 2023
@jbrockmendel
Copy link
Member

thanks @MarcoGorelli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Non-Nano datetime64/timedelta64 with non-nanosecond resolution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DatetimeIndex with non-nano values and freq='D' throws ValueError

2 participants