Skip to content

Add _get_numeric_data() to the public API? #5775

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

Closed
jackmaney opened this issue Dec 26, 2013 · 6 comments
Closed

Add _get_numeric_data() to the public API? #5775

jackmaney opened this issue Dec 26, 2013 · 6 comments

Comments

@jackmaney
Copy link

In a tool that I'm building that utilizes Pandas data frames, I'm adding a simple data validation layer to only accept numeric columns of a given data frame. I found a Stack Overflow question from a bit over a year ago pointing out the private _get_numeric_data() method in the DataFrame class. Would it be possible to make this method part of the public API?

(And my apologies if this request has been made before; I did a few searches through the issues and didn't find anything.)

@jtratner
Copy link
Contributor

Could you write a function that filters based on the dtypes property?
Shouldn't be too difficult and lets you customize what you want to get.

I think this would be a pretty limited use case, so I'd prefer not to
expand the public API for this.

@jreback
Copy link
Contributor

jreback commented Jan 25, 2014

feel free to submit a function to say the cookbook for dtype filtering

@jreback jreback closed this as completed Jan 25, 2014
@jseabold
Copy link
Contributor

I find myself implementing this functionality over and over again. FWIW, I think having a public API for get_dtype would be super useful where it's more general than just a filter. Ie., get numeric types, get object types, get categorical types. Or even get numeric, object, date, or categorical column names.

@jreback
Copy link
Contributor

jreback commented Jul 21, 2015

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.select_dtypes.html?highlight=dtypes#pandas.DataFrame.select_dtypes

I suppose is not advertised that much

@jseabold
Copy link
Contributor

jseabold commented Jul 21, 2015 via email

@jseabold
Copy link
Contributor

How have I never noticed this? Cross-linking. This is more or less addressed in #7434.

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

No branches or pull requests

4 participants