-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: DataFrame.select_dtypes should accept scalar #16855
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
+100 :) We should do the same for |
I was looking at picking this up as one of my first contributions. A quick question for clarity though.
is valid. My question is: what's the expected behaviour for |
Correct. It should convert any scalar type to an iterable.
… On Jul 8, 2017, at 07:56, Keiron Pizzey ***@***.***> wrote:
I was looking at picking this up as one of my first contributions. A quick question for clarity though.
select_dtypes allows strings ('category', 'datetimetz', etc) but also allows numpy.number. For example:
df.select_dtypes(include=['category', numpy.number])
is valid.
My question is: what's the expected behaviour for df.select_dtypes(include=np.number)? The original issue only mentions allowing strings but it seems silly to exclude np.number, as such I'll continue by assuming that's the way to go but would be good to get some clarity.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Problem description
Only a convenience thing, but basically anywhere else we take list-likes, we accept a single string and I think should do the same here.
pandas 0.20.2
The text was updated successfully, but these errors were encountered: