Skip to content

BUG: Don't supply name to Series when using 'size' with agg/apply#42046

Merged
simonjayhawkins merged 1 commit intopandas-dev:masterfrom
rhshadrach:size_no_name
Jun 16, 2021
Merged

BUG: Don't supply name to Series when using 'size' with agg/apply#42046
simonjayhawkins merged 1 commit intopandas-dev:masterfrom
rhshadrach:size_no_name

Conversation

@rhshadrach
Copy link
Copy Markdown
Member

  • Ensure all linting tests pass, see here for how to run them

Ref: #39935 (comment)

Doing e.g.

print(DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}).apply('sum'))
print(DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}).agg('sum'))

produce a Series with name=None. This was introduced in 1.3, so does not need a whatsnew.

@rhshadrach rhshadrach added Bug Apply Apply, Aggregate, Transform, Map labels Jun 16, 2021
@rhshadrach rhshadrach added this to the 1.3 milestone Jun 16, 2021
Copy link
Copy Markdown
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm merge and backport on greenish

@rhshadrach
Copy link
Copy Markdown
Member Author

@jreback greenish; failure is unrelated

FAILED pandas/tests/indexes/numeric/test_numeric.py::TestUInt64Index::test_constructor_does_not_cast_to_float
= 1 failed, 170123 passed, 6374 skipped, 874 xfailed, 6 xpassed, 352 warnings in 1414.92s (0:23:34) =

@simonjayhawkins
Copy link
Copy Markdown
Member

@jreback greenish; failure is unrelated

FAILED pandas/tests/indexes/numeric/test_numeric.py::TestUInt64Index::test_constructor_does_not_cast_to_float
= 1 failed, 170123 passed, 6374 skipped, 874 xfailed, 6 xpassed, 352 warnings in 1414.92s (0:23:34) =

now fixed.

@simonjayhawkins simonjayhawkins merged commit 4da0577 into pandas-dev:master Jun 16, 2021
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Jun 16, 2021
@simonjayhawkins
Copy link
Copy Markdown
Member

Thanks @rhshadrach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apply Apply, Aggregate, Transform, Map Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants