-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Comments
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? |
the string |
I see, thanks.
So taking `select_dtypes(np.number)` as example. You pass the class
`np.number` to select every numeric-dtype column.
Could users pass `select_dtypes(pd.PeriodDtype)` (the class) to select
every period-type column? And possibly a string alias like `'period'`.
…On Wed, Jan 2, 2019 at 11:06 AM Jeff Reback ***@***.***> wrote:
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIkLXp5mN2vTH7Rx_UcKNpzGl-JNBks5u_OcOgaJpZM4Zm7w8>
.
|
I just hit a use case where I need to be able to select |
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 |
we can except both here, iow prob ok to joy depreciate anything as long as it's clear and what does what |
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 meanperiod[*]
anddatetime64[*, *]
or something like this to select all sub-dtypes, but we con't really have any sytax to account for this.The text was updated successfully, but these errors were encountered: