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

Comments

Projects
None yet
4 participants
@lbeltrame
Contributor

lbeltrame commented Oct 25, 2011

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

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Oct 25, 2011

Member

What about df.describe()?

Member

wesm commented Oct 25, 2011

What about df.describe()?

@lbeltrame

This comment has been minimized.

Show comment
Hide comment
@lbeltrame

lbeltrame Oct 25, 2011

Contributor

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.

Contributor

lbeltrame commented Oct 25, 2011

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

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Oct 25, 2011

Member

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?

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

This comment has been minimized.

Show comment
Hide comment
@lbeltrame

lbeltrame Oct 25, 2011

Contributor

In my opinion yes, a Series would do perfectly.

Contributor

lbeltrame commented Oct 25, 2011

In my opinion yes, a Series would do perfectly.

@changhiskhan

This comment has been minimized.

Show comment
Hide comment
@changhiskhan

changhiskhan Nov 14, 2011

Contributor

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

Contributor

changhiskhan commented Nov 14, 2011

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

@wesm

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Nov 14, 2011

Member

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

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