Skip to content
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

BUG: Fix css for displaying DataFrames in notebook #16792 #16879

Merged
merged 18 commits into from
Sep 22, 2017
Merged

BUG: Fix css for displaying DataFrames in notebook #16792 #16879

merged 18 commits into from
Sep 22, 2017

Conversation

margotphoenix
Copy link
Contributor

@TomAugspurger
Copy link
Contributor

Could you attach before / after screenshots?

@TomAugspurger TomAugspurger added the IO HTML read_html, to_html, Styler.apply, Styler.applymap label Jul 11, 2017
@TomAugspurger TomAugspurger added this to the 0.21.0 milestone Jul 11, 2017
@margotphoenix
Copy link
Contributor Author

Index Vertical Alignment with Wrapping Text

Before

screen shot 2017-07-12 at 12 22 19 pm

After

screen shot 2017-07-12 at 12 31 34 pm

Header Horizontal Alignment with Named Index and non-MultiIndex Columns

Before

screen shot 2017-07-12 at 12 27 00 pm

After

screen shot 2017-07-12 at 12 32 43 pm

Header Horizontal Alignment with Named Index and MultiIndex Columns

Before

screen shot 2017-07-12 at 12 27 37 pm

After

screen shot 2017-07-12 at 12 33 10 pm

@TomAugspurger
Copy link
Contributor

Thanks, I think these all look better.

You'll need to update some of the tests, as they were checking the old structure. But +1 on the changes so far.

@jreback
Copy link
Contributor

jreback commented Jul 19, 2017

can you update

@pep8speaks
Copy link

pep8speaks commented Jul 20, 2017

Hello @margotphoenix! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on September 20, 2017 at 19:29 Hours UTC

@margotphoenix
Copy link
Contributor Author

Apologies for the delay in updating. I was out of town.

@codecov
Copy link

codecov bot commented Jul 20, 2017

Codecov Report

Merging #16879 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16879      +/-   ##
==========================================
- Coverage   91.22%   91.18%   -0.05%     
==========================================
  Files         163      163              
  Lines       49625    49636      +11     
==========================================
- Hits        45270    45259      -11     
- Misses       4355     4377      +22
Flag Coverage Δ
#multiple 88.96% <100%> (-0.03%) ⬇️
#single 40.19% <0%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 96.07% <100%> (+0.02%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_tools.py 72.92% <0%> (-6.08%) ⬇️
pandas/plotting/_core.py 82.52% <0%> (-0.21%) ⬇️
pandas/core/frame.py 97.77% <0%> (-0.1%) ⬇️
pandas/core/indexes/multi.py 96.9% <0%> (ø) ⬆️
pandas/plotting/_converter.py 63.38% <0%> (+0.15%) ⬆️

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 0e85ca7...9cd4d5a. Read the comment docs.

@gfyoung
Copy link
Member

gfyoung commented Jul 20, 2017

@margotphoenix : You should also add a whatsnew since this is a bug.

@gfyoung
Copy link
Member

gfyoung commented Jul 20, 2017

Apologies for the delay in updating

No worries. We've had to wait MUCH longer than a day for updates before 😄

@@ -160,6 +160,7 @@ I/O
^^^

- Bug in :func:`read_csv` in which non integer values for the header argument generated an unhelpful / unrelated error message (:issue:`16338`)
- Bug in ``DataFrame.to_html()`` with ``notebook=True`` where DataFrames with named indexes or non-MultiIndex indexes had undesired horizontal or vertical alignment for column or row labels, respectively (:issue:`16792`)
Copy link
Member

Choose a reason for hiding this comment

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

indexes --> indices

", respectively" --> " respectively"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dammit, I had "indices" right then I changed it right before committing

Copy link
Member

Choose a reason for hiding this comment

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

indices/indexes is actually both correct :-)
http://grammarist.com/usage/indexes-indices/

@jreback
Copy link
Contributor

jreback commented Sep 10, 2017

can you rebase / update and see if you can get tests passing

@margotphoenix
Copy link
Contributor Author

done

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

This looks good!

Do you have time to update for the last comment of @jreback ?

pandas/tests/io/formats/test_to_html.py Show resolved Hide resolved
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Removed trailing whitespace
@TomAugspurger
Copy link
Contributor

Yeah, I think so. Just removed some trailing whitespace in 9cd4d5a

@jorisvandenbossche jorisvandenbossche merged commit dfb6c48 into pandas-dev:master Sep 22, 2017
@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Sep 22, 2017

@margotphoenix Thanks!

TomAugspurger added a commit to TomAugspurger/dask that referenced this pull request Oct 3, 2017
TomAugspurger added a commit to TomAugspurger/dask that referenced this pull request Oct 5, 2017
TomAugspurger added a commit to TomAugspurger/dask that referenced this pull request Oct 5, 2017
TomAugspurger added a commit to dask/dask that referenced this pull request Oct 5, 2017
* COMPAT: pandas TimeGrouper

xref pandas-dev/pandas#16747

* COMPAT: For pandas 0.21 CategoricalDtype

* COMPAT: For pandas 0.21.0 HTML repr changes

pandas-dev/pandas#16879

* COMPAT: For pandas 0.21.0 numexpr import

pandas-dev/pandas#17710

* COMPAT: Default for inplace is now False in eval

pandas-dev/pandas#11149
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML table styling in notebook has awkward alignment when text wraps or when index is named
6 participants