Skip to content

Backport PR #27991 on branch 0.25.x (DataFrame html repr: also follow min_rows setting) #28044

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

meeseeksmachine
Copy link
Contributor

Backport PR #27991: DataFrame html repr: also follow min_rows setting

@lumberbot-app lumberbot-app bot added this to the 0.25.1 milestone Aug 20, 2019
@jorisvandenbossche
Copy link
Member

Hmm, no idea why this is failing here. cc @TomAugspurger

There are some errors related to the change:

__________________ TestDataFrameFormatting.test_repr_min_rows __________________
[gw0] linux -- Python 3.7.4 /home/travis/miniconda3/envs/pandas-dev/bin/python
self = <pandas.tests.io.formats.test_format.TestDataFrameFormatting object at 0x7f1cf575e850>
    def test_repr_min_rows(self):
        df = pd.DataFrame({"a": range(20)})
    
        # default setting no truncation even if above min_rows
        assert ".." not in repr(df)
>       assert ".." not in df._repr_html_()
E       TypeError: argument of type 'NoneType' is not iterable

That should only happen (the result being None) if get_option("display.notebook_repr_html") gives False. Not sure why that would not be the default here (which is hardcoded to True).

But, there are also a bunch of repr tests failing that are not related to the html repr ..

@TomAugspurger
Copy link
Contributor

Hmm strange. I'm able to reproduce on 0.25.x.

@jorisvandenbossche
Copy link
Member

OK, the return value of formatter.to_html changed on master recently (#27598), and to avoid to need to backpart that PR as well, just pushed a small fix here.

@jorisvandenbossche jorisvandenbossche merged commit 8795cb7 into pandas-dev:0.25.x Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants