Skip to content

DEPR: .select_dtypes accepts non-standard dtype references #24558

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

Open
jreback opened this issue Jan 2, 2019 · 8 comments
Open

DEPR: .select_dtypes accepts non-standard dtype references #24558

jreback opened this issue Jan 2, 2019 · 8 comments
Labels
Deprecate Functionality to remove in pandas Period Period data type Timezones Timezone data dtype

Comments

@jreback
Copy link
Contributor

jreback commented Jan 2, 2019

xref #24541

DataFrame.select_dtypes() accepts strings including:

  • datetimetz
  • datetime64tz
  • period (this is currently not-implemented).

These are non-standard names of dtypes, but not specific enough to the and should deprecated. An argument can be made that we should accept period to mean period[*] and datetime64[*, *] or something like this to select all sub-dtypes, but we con't really have any sytax to account for this.

@jreback jreback added Timezones Timezone data dtype Period Period data type Deprecate Functionality to remove in pandas labels Jan 2, 2019
@jreback jreback added this to the Contributions Welcome milestone Jan 2, 2019
@jreback
Copy link
Contributor Author

jreback commented Jan 2, 2019

cc @jbrockmendel @TomAugspurger

@TomAugspurger
Copy link
Contributor

I'd support a way to select all the dtypes of parametrized dtype like datetimetz or period, much like we do for numeric. But what are you suggesting we deprecate?

@jreback
Copy link
Contributor Author

jreback commented Jan 2, 2019

the string datetime64tz and datetimetz are just made up things I think we need a format more specific (with a string), e.g. datetime64[ns, *] is more informative and compatible with what we have now.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jan 2, 2019 via email

@jmg-duarte
Copy link
Contributor

I just hit a use case where I need to be able to select period columns, what is the status on this issue?
I am available to help implement a solution!

@jreback
Copy link
Contributor Author

jreback commented Dec 6, 2021

this is an open issue and would welcome more specification and a PR

@jmg-duarte
Copy link
Contributor

this is an open issue and would welcome more specification and a PR

What I meant was: is the idea to deprecate or implement?

For me it makes sense to use period instead of period[*] to refer to all period columns (likewise for the other types), although I don't care much for one or the other, I just need the feature

@jreback
Copy link
Contributor Author

jreback commented Dec 6, 2021

we can except both here, iow prob ok to joy depreciate anything as long as it's clear and what does what

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
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 Period Period data type Timezones Timezone data dtype
Projects
None yet
Development

No branches or pull requests

4 participants