Skip to content

Commit

Permalink
Display df, not styled
Browse files Browse the repository at this point in the history
I had misunderstood the intention of the reviewer.
  • Loading branch information
jnothman committed Apr 19, 2017
1 parent 6465913 commit 934df06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ For example, after running the following, ``styled.xlsx`` renders as below:
columns=list('BCDE'))],
axis=1)
df.iloc[0, 2] = np.nan
df
styled = df.style.\
applymap(lambda val: 'color: %s' % 'red' if val < 0 else 'black').\
apply(lambda s: ['background-color: yellow' if v else ''
for v in s == s.max()])
styled
styled.to_excel('styled.xlsx', engine='openpyxl')

.. image:: _static/style-excel.png
Expand Down

0 comments on commit 934df06

Please sign in to comment.