-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix DataFrame.agg produces different types if the DataFrame is empty #41722
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
weikhor
commented
May 29, 2021
•
edited
Loading
edited
- [ ✔] closes BUG: DataFrame.agg produces different types if the DataFrame is empty #41672
- [ ❌] tests added / passed
- [ ❌] Ensure all linting tests pass, see here for how to run them
@@ -0,0 +1,19 @@ | |||
import numpy as np | |||
|
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.
these go in pandas/tests/apply/test_frame_apply.py
there are already extensive tests, so find a good place to exercise the empty case
we have these, so model after
(pandas) jreback@lhs2:~/pandas-dev$ grep -r empty pandas/tests/apply/|grep def
pandas/tests/apply/test_frame_transform.py:def test_transform_empty_listlike(float_frame, ops, frame_or_series):
pandas/tests/apply/test_frame_transform.py:def test_transform_empty_dictlike(float_frame, ops, frame_or_series):
pandas/tests/apply/test_frame_transform.py:def test_transform_empty_dataframe():
pandas/tests/apply/test_series_apply.py:def test_apply_empty_integer_series_with_datetime_index():
pandas/tests/apply/test_series_apply.py:def test_map_empty(index):
pandas/tests/apply/test_frame_apply.py:def test_apply_empty(float_frame):
pandas/tests/apply/test_frame_apply.py:def test_apply_with_reduce_empty():
pandas/tests/apply/test_frame_apply.py:def test_apply_funcs_over_empty(func):
pandas/tests/apply/test_frame_apply.py:def test_nunique_empty():
pandas/tests/apply/test_frame_apply.py:def test_apply_empty_infer_type():
pandas/tests/apply/test_frame_apply.py:def test_apply_empty_list_reduce():
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
Thanks @weikhor for the PR. can you add a release note to doc/source/whatsnew/v1.3.1.rst, Bug fixes section and address #41722 (comment) |
Thanks for the PR, but it appears this has gone stale and needs addressing of the reviews. Closing, but happy to reopen if still interested. |