Skip to content

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

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
merged 5 commits into from
Jan 22, 2022

Conversation

EzraBrauner
Copy link
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
Member

Thanks - please add a test too

Copy link
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
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
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
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