-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH + BUG: insert of new values for axis parameter on pandas.DataFrame.quantile #9544
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
Conversation
you don't need all this.
mainly need to add a test |
You are right. I am correcting it. |
I corrected it and I implemented a basic test. In case tell me if I did any mistake. |
axis : {0, 1} | ||
0 for row-wise, 1 for column-wise | ||
axis : {0, 1, 'index', 'columns'} (default 0) | ||
0 or 'index' a quantile for each column, 1 or 'columns' a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is as clear as the 0 for row-wise, .... What about 0 or 'index' for row-wise, ...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Kevin,
I think you are right. I found it more clear defining exactly what the result will be (because I found that non-native english speakers often struggle to understand the meaning of -wise: see http://forum.wordreference.com/showthread.php?t=403654 ). But I think that your observation is correct.
I finally had the time to complete my PR with the Travis CI build. Now what have I to do? (it is my first PR) |
@@ -11786,6 +11786,30 @@ def test_quantile(self): | |||
expected = Series([3., 4.], index=[0, 1]) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_quantile_axis_parameter(self): | |||
from numpy import percentile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the issue number here
this looks fine. can you add a release note for 0.17.0 in the API section? ping when travis is green. |
Hi @jreback
Thanks |
@fbrundu this the file to which to add release notes: https://github.com/pydata/pandas/blob/master/doc/source/whatsnew/v0.16.2.txt (we're actually going to release 0.16.2 before 0.17, and this can go in there) As for the issue number, yes that would be fine. Something as simple as |
@jreback travis is green but git tells me merge conflicts |
merged via c0917de thanks! |
closes #9543
I added the values "index" and "columns" for the axis parameter of the method pandas.DataFrame.quantile().
Also, there was no check on the value inserted for axis. E.g. if 2 or "foo" was inserted, no ValueError() was raised.
I added a basic check.
Thanks