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

R-like range() function #288

Closed
lbeltrame opened this issue Oct 25, 2011 · 6 comments
Closed

R-like range() function #288

lbeltrame opened this issue Oct 25, 2011 · 6 comments

Comments

@lbeltrame
Copy link
Contributor

In R, if I supply range(dataframe), I get back a vector of the minimum value in all the dataframe and the maximum value in all the dataframe.

DataFrame's min() and max() functions operate only on single columns. The way to do it currently is

minimum, maximum = (min(df.min()), max(df.max())

It's not a critical limitation, but it is convenient to have at times.

@wesm
Copy link
Member

wesm commented Oct 25, 2011

What about df.describe()?

@lbeltrame
Copy link
Contributor Author

I looked into that: it returns a new DataFrame with the various statistics separated for each column. I was more interested in "global" (df-wide) values. I understand however that with mixed-type colums this may be a problem.

@wesm
Copy link
Member

wesm commented Oct 25, 2011

Ah, I got it. Should just start a tools module and put things like this there. I don't think it merits an instance method. Do you think it should return a Series?

@lbeltrame
Copy link
Contributor Author

In my opinion yes, a Series would do perfectly.

@changhiskhan
Copy link
Contributor

@wesm any other useful functions to put in here? no sense in you spending time merging for 4 lines of code.

@wesm
Copy link
Member

wesm commented Nov 14, 2011

feel free to just accumulate things in a branch and I'll merge them whenever. i'm about to put the kibosh on anymore changes to 0.5.1, do a little more sanity checking, fix up docs, then cut the release

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