-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Add test case for applying a function to a groupby object that append… #53138
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
…s each group to a list without using copy() function. The test checks if the groups are correctly appended to the list. This resolves GH issue 17718.
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,
Some checks are failing because of the formatting of the code.
here is the documentation for pre-commit
.
Could you install it and then commit again?
OK, thank you :) |
groups.append(group) | ||
|
||
df.groupby("index").apply(store) | ||
expected_value = DataFrame( |
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.
Could you make expected
equal to
DataFrame({"index": [0] * 10, 0: [1] * 10}, index=np.arange(0, 100, 10))
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.
Could you make
expected
equal toDataFrame({"index": [0] * 10, 0: [1] * 10}, index=np.arange(0, 100, 10))
No Problem ;)
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.
Could you make
expected
equal toDataFrame({"index": [0] * 10, 0: [1] * 10}, index=np.arange(0, 100, 10))
Is it ok that I used pd.RangeIndex instead of np.arange? I got an error about dtypes and pd.RangeIndex fixed it
…nto my-first-branch
… index=pd.RangeIndex(0, 100, step=10))
Thanks @idor980 |
pandas-dev#53138) * Add test case for applying a function to a groupby object that appends each group to a list without using copy() function. The test checks if the groups are correctly appended to the list. This resolves GH issue 17718. * installed pre-commit * update expected_value * update expected and installed pre-commit * test commit * committing update for expected value from my last verified commit * update expected_value to pd.DataFrame({index: [0] * 10, 0: [1] * 10}, index=pd.RangeIndex(0, 100, step=10)) --------- Co-authored-by: Ido Ronen <idor98@Idos-MacBook-Pro.local>
pandas-dev#53138) * Add test case for applying a function to a groupby object that appends each group to a list without using copy() function. The test checks if the groups are correctly appended to the list. This resolves GH issue 17718. * installed pre-commit * update expected_value * update expected and installed pre-commit * test commit * committing update for expected value from my last verified commit * update expected_value to pd.DataFrame({index: [0] * 10, 0: [1] * 10}, index=pd.RangeIndex(0, 100, step=10)) --------- Co-authored-by: Ido Ronen <idor98@Idos-MacBook-Pro.local>
…s each group to a list without using copy() function. The test checks if the groups are correctly appended to the list. This resolves GH issue 17718.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.