Skip to content

BUG: fix empty Series repr for subclasses #27001

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

Conversation

jorisvandenbossche
Copy link
Member

Currently, the 'Series' name is hardcoded in the empty repr. This small patch ensures it uses the name of the class.

@jorisvandenbossche jorisvandenbossche added the Output-Formatting __repr__ of pandas objects, to_string label Jun 22, 2019
@jorisvandenbossche jorisvandenbossche added this to the 0.25.0 milestone Jun 22, 2019
@codecov
Copy link

codecov bot commented Jun 22, 2019

Codecov Report

Merging #27001 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27001      +/-   ##
==========================================
- Coverage   91.99%   91.98%   -0.01%     
==========================================
  Files         180      180              
  Lines       50774    50774              
==========================================
- Hits        46711    46707       -4     
- Misses       4063     4067       +4
Flag Coverage Δ
#multiple 90.63% <100%> (ø) ⬆️
#single 41.83% <0%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 97.91% <100%> (ø) ⬆️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a14874f...ca58557. Read the comment docs.

2 similar comments
@codecov
Copy link

codecov bot commented Jun 22, 2019

Codecov Report

Merging #27001 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27001      +/-   ##
==========================================
- Coverage   91.99%   91.98%   -0.01%     
==========================================
  Files         180      180              
  Lines       50774    50774              
==========================================
- Hits        46711    46707       -4     
- Misses       4063     4067       +4
Flag Coverage Δ
#multiple 90.63% <100%> (ø) ⬆️
#single 41.83% <0%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 97.91% <100%> (ø) ⬆️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a14874f...ca58557. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 22, 2019

Codecov Report

Merging #27001 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27001      +/-   ##
==========================================
- Coverage   91.99%   91.98%   -0.01%     
==========================================
  Files         180      180              
  Lines       50774    50774              
==========================================
- Hits        46711    46707       -4     
- Misses       4063     4067       +4
Flag Coverage Δ
#multiple 90.63% <100%> (ø) ⬆️
#single 41.83% <0%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 97.91% <100%> (ø) ⬆️
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a14874f...ca58557. Read the comment docs.

@@ -39,6 +39,9 @@ def test_subclass_unstack(self):

tm.assert_frame_equal(res, exp)

def test_subclass_empty_repr(self):
Copy link
Member

Choose a reason for hiding this comment

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

Reference PR number as comment below this

Copy link
Contributor

Choose a reason for hiding this comment

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

General question: if a PR is already passing, is it worth another commit and CI run just for this?

I'd prefer to just merge and be done with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

yep that’s cool

@WillAyd WillAyd merged commit 8ea2d08 into pandas-dev:master Jun 25, 2019
@WillAyd
Copy link
Member

WillAyd commented Jun 25, 2019

Thanks @jorisvandenbossche !

@jorisvandenbossche jorisvandenbossche deleted the series-empty-repr-subclass branch July 9, 2019 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants