Skip to content

Conversation

HHammond
Copy link
Contributor

@HHammond HHammond commented Feb 8, 2016

Addresses #12090 (comment) by making the Styler behaviour match regular to_html behaviour.

This PR is based from #12162.

New behaviour

screen shot 2016-02-08 at 10 35 23 am

cc @TomAugspurger

@HHammond
Copy link
Contributor Author

HHammond commented Feb 8, 2016

Actual commit: 0cb2be1

@HHammond
Copy link
Contributor Author

HHammond commented Feb 8, 2016

Tests are failing on lint with files this PR doesn't touch: https://travis-ci.org/pydata/pandas/jobs/107799224#L1134-L1154

$ ci/lint.sh
inside ci/lint.sh
discarding /home/travis/miniconda/bin from PATH
prepending /home/travis/miniconda/envs/pandas/bin to PATH
linting -> pandas/core
linting -> pandas/io
pandas/io/sql.py:24:1: F401 'Appender' imported but unused
pandas/io/tests/test_sql.py:2327:33: E127 continuation line over-indented for visual indent
pandas/io/tests/test_sql.py:2675:33: E127 continuation line over-indented for visual indent
pandas/io/tests/test_sql.py:2741:25: E127 continuation line over-indented for visual indent
linting -> pandas/stats
linting -> pandas/compat
linting -> pandas/sparse
linting -> pandas/tools
linting -> pandas/tseries
linting -> pandas/tests
linting -> pandas/computation
linting -> pandas/util
The command "ci/lint.sh" exited with 1.

@TomAugspurger
Copy link
Contributor

Joris is fixing that here. I'll restart your travis build once that's merged.

@jreback jreback added the IO HTML read_html, to_html, Styler.apply, Styler.applymap label Feb 11, 2016
@TomAugspurger
Copy link
Contributor

@HHammond can you rebase on master when you get a chance. I think it should be a clean rebase.

TomAugspurger and others added 2 commits February 12, 2016 22:04
Closes pandas-dev#11692
Closes pandas-dev#12134
Closes pandas-dev#12125

This adds a `.format` method to Styler for formatting the display value
(the actual text) of each scalar value.

In the processes of cleaning up the template, I close pandas-dev#12134 (spurious 0)
and pandas-dev#12125 (KeyError from using iloc improperly)

cherry pick test from pandas-dev#12126

only allow str formatting for now

fix tests for new spec

formatter callable

update notebook
@HHammond HHammond force-pushed the style-remove-col-index-none branch from 0cb2be1 to 48c2f4c Compare February 13, 2016 03:04
@TomAugspurger
Copy link
Contributor

@jreback Wanted to double check with you before I mess anything up, the merge script will handle this merge cleanly right? There's the two commits, one of which is now in master. Second commit has no conflicts.

@jreback
Copy link
Contributor

jreback commented Mar 3, 2016

you can run the merge script then pause when it asked if u want to push upstream
thrn in another window check that everything is good (you can even edit the commit message at this point)

@TomAugspurger
Copy link
Contributor

OK, thanks. I'll document that in the wiki.

@jreback jreback added this to the 0.18.0 milestone Mar 3, 2016
@jorisvandenbossche
Copy link
Member

For some reason, the travis builds started to fail after merging this one. But does not seem to be related at first sight ("ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory" and "ERROR: test_get_all_data (pandas.io.tests.test_data.TestYahooOptions)")

@TomAugspurger
Copy link
Contributor

Looking into it now, sorry.

TomAugspurger added a commit to TomAugspurger/pandas that referenced this pull request Mar 4, 2016
Also redoes some of the changes that were inadvertently revereted
in pandas-dev#12260.

That PR had two commits, one of which was an older version of
what was eventually merged in
pandas-dev#12162.

The stale commit incorrectly merged was a15248a.
It should have been a3c38fe.

For the most part the changes were just style, but there was a python2
import error, which our tests didn't fail on because I was trying to
catch a jinja ImportError, and instead caught all ImportErrors.
jreback pushed a commit that referenced this pull request Mar 5, 2016
Also redoes some of the changes that were inadvertently revereted
in #12260.

That PR had two commits, one of which was an older version of
what was eventually merged in
#12162.

The stale commit incorrectly merged was a15248a.
It should have been a3c38fe.

For the most part the changes were just style, but there was a python2
import error, which our tests didn't fail on because I was trying to
catch a jinja ImportError, and instead caught all ImportErrors.
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.

4 participants