Skip to content

BUG: Adds newline after info() call on empty dataframe#45498

Merged
jreback merged 5 commits intopandas-dev:mainfrom
EzraBrauner:shiny-new-feature
Jan 22, 2022
Merged

BUG: Adds newline after info() call on empty dataframe#45498
jreback merged 5 commits intopandas-dev:mainfrom
EzraBrauner:shiny-new-feature

Conversation

@EzraBrauner
Copy link
Copy Markdown
Contributor

This fix improves the formatting of the output of pd.DataFrame.info() when called on an empty DataFrame by adding a newline, per the above issue.

I don't know if this is the proper style for adding newlines, but it appears to pass the linting tests. I'm pretty new to open-source development so let me know if anything should be changed.

@MarcoGorelli
Copy link
Copy Markdown
Member

Thanks - please add a test too

Copy link
Copy Markdown
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

actually, perhaps you could modify

def test_info_empty():

instead of adding a new test?

Will also need a whatsnew note

Copy link
Copy Markdown
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @EzraBrauner

@EzraBrauner
Copy link
Copy Markdown
Contributor Author

Thanks for working with me!

@mroeschke mroeschke added the Output-Formatting __repr__ of pandas objects, to_string label Jan 20, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jan 20, 2022
@jreback jreback merged commit 4e3d691 into pandas-dev:main Jan 22, 2022
@jreback
Copy link
Copy Markdown
Contributor

jreback commented Jan 22, 2022

thanks @EzraBrauner

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.

BUG: missing newline when info is called on DataFrame

4 participants