-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ERR: Improve error message in validate_percentile #51475
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
Merged
phofl
merged 26 commits into
pandas-dev:main
from
ShashwatAgrawal20:validate_percentile_51436
Apr 7, 2023
Merged
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7a59553
fixed: valueError
ShashwatAgrawal20 e20e1dc
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 761492a
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 afa5ee5
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 fd8d6d0
shorten msg
ShashwatAgrawal20 466ff31
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 c8f686c
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 4458985
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 48e94bf
Added test file
ShashwatAgrawal20 64fcc9e
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 9757aa1
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 96c8673
refactored test file
ShashwatAgrawal20 0faa76e
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 faf2978
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 46141ec
moved test to quantile file
ShashwatAgrawal20 9a0aae0
modified test file
ShashwatAgrawal20 f295e32
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 c682cdb
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 ed1935e
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 e933efd
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 e92be61
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 f2fb73e
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 ba7aeb0
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 24b2e3d
Merge branch 'pandas-dev:main' into validate_percentile_51436
ShashwatAgrawal20 ce543f6
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 5a08a2c
Merge branch 'main' into validate_percentile_51436
ShashwatAgrawal20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import numpy as np | ||
import pytest | ||
|
||
import pandas as pd | ||
|
||
|
||
def test_series_quantile_invalid_percentile(): | ||
s = pd.Series(np.random.randn(100)) | ||
percentile_array = [-0.5, 0.25, 1.5] | ||
msg = "percentiles should all be in the interval \\[0, 1\\]" | ||
with pytest.raises(ValueError, match=msg): | ||
s.quantile(percentile_array) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There is a file for quantile tests
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.
The
pandas/tests/frame/methods/test_quantile.py
one ?