-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
add test cases for GroupBy.apply trivial cases #20081
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
Codecov Report
@@ Coverage Diff @@
## master #20081 +/- ##
==========================================
- Coverage 91.72% 91.7% -0.03%
==========================================
Files 150 150
Lines 49122 49137 +15
==========================================
+ Hits 45057 45060 +3
- Misses 4065 4077 +12
Continue to review full report at Codecov.
|
pandas/tests/groupby/test_groupby.py
Outdated
@@ -233,6 +233,39 @@ def test_apply_issues(self): | |||
lambda x: x['time'][x['value'].idxmax()]) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_apply_trivial(self): | |||
# GH 20066 | |||
def gen_one_df(start=0): |
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.
you dont need a function for this, just create the dataframe directly
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.
done in my last commit.
pandas/tests/groupby/test_groupby.py
Outdated
|
||
assert_frame_equal(result, expected) | ||
|
||
@pytest.mark.xfail(reason="didn't work yet") |
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 mark the issue and provide some more explanation
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.
done in my last commit.
@@ -233,6 +233,39 @@ def test_apply_issues(self): | |||
lambda x: x['time'][x['value'].idxmax()]) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_apply_trivial(self): | |||
# GH 20066 |
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 provide a 1-line comment
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.
done in my last commit.
slightly off topic. It would be nice to split up tests_groupby.py somewhat if you would like to tackle this. Ideally would group some similar tests together and split out some to either existing sub-modules or some new ones. |
@jreback probably not right now. I've just learned to use GroupBy stuffs... and then got hit by a bug... |
thanks. will merge after the doc sprint. |
thanks @zym1010 love for you to look into this issue (or others!) |
git diff upstream/master -u -- "*.py" | flake8 --diff