Skip to content
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

[DEPR] Assorted footguns in dtype checks #22137

Closed
5 of 6 tasks
jbrockmendel opened this issue Jul 30, 2018 · 1 comment
Closed
5 of 6 tasks

[DEPR] Assorted footguns in dtype checks #22137

jbrockmendel opened this issue Jul 30, 2018 · 1 comment
Labels
Deprecate Functionality to remove in pandas

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Jul 30, 2018

Finding some things that don't behave in The Obvious Way:

  • dtypes.common.is_period
    Never used outside of tests, checks for PeriodDtype-like arrays, not Period scalar.
  • dtypes.common.is_datetimelike
    Checks for datetime64_dtype, datetime64tz_dtype, PeriodIndex, or timedelta64_dtype, the last of which is not obvious (and in fact caused some bugs that will be fixed by [Bug] Fix various DatetimeIndex comparison bugs #22074)
  • dtypes.common.is_int_or_datetime_dtype only used in two places, better to write out the conditions explicitly.
  • dtypes.common.is_floating_dtype deprecated in 0.20.0, is it too early to remove?
  • dtypes.common.is_datetimetz appears to be a duplicate of is_datetime64tz_dtype
  • lib.is_integer
    Returns True for timedelta64 objects; inconsistent with is_integer_dtype which excludes timedelta64.
@jbrockmendel jbrockmendel changed the title [DEPR] Assorted footguns in dtype tests [DEPR] Assorted footguns in dtype checks Jul 30, 2018
@jbrockmendel jbrockmendel added the Deprecate Functionality to remove in pandas label Jul 30, 2018
@gfyoung
Copy link
Member

gfyoung commented Nov 26, 2018

xref #16242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

No branches or pull requests

2 participants