-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
check ExtensionType in is_datetime64_any_dtype for array-likes #57060
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
check ExtensionType in is_datetime64_any_dtype for array-likes #57060
Conversation
Failures in CI look unrelated to this PR (logs)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test in test_arrow.py
?
Thanks @mroeschke. The test is failing (log) for arrow date types
since for those types Edit import pyarrow as pa
type(pa.date32().to_pandas_dtype())
# numpy.dtypes.DateTime64DType
type(pa.date64().to_pandas_dtype())
# numpy.dtypes.DateTime64DType so I've included those in the test for |
I think the date types should return False. In pandas they don't always behave like date times |
Agree, for example trying to extract the second raises an error. I'll make the changes. |
Thanks @jmoralez |
…s-dev#57060) * check for ExtensionType in is_datetime64_any_dtype * use pre-commit * add test and move doc entry * check not date in test * fix condition * check type is not datetime.date * fix comparison * move description to ExtensionArray * return True for date types
is_datetime64_any_dtype
returnsFalse
for Series with pyarrow dtype #57055doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.