Skip to content

Commit

Permalink
Recommended changes to what's new
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Apr 19, 2017
1 parent 9669d7d commit 6168765
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions doc/source/whatsnew/v0.20.0.txt
Expand Up @@ -17,6 +17,7 @@ Highlights include:
- Improved user API when accessing levels in ``.groupby()``, see :ref:`here <whatsnew_0200.enhancements.groupby_access>`
- Improved support for ``UInt64`` dtypes, see :ref:`here <whatsnew_0200.enhancements.uint64_support>`
- A new orient for JSON serialization, ``orient='table'``, that uses the :ref:`Table Schema spec <whatsnew_0200.enhancements.table_schema>`
- Experimental support for exporting ``DataFrame.style`` formats to Excel , see :ref:`here <whatsnew_0200.enhancements.style_excel>`
- Window Binary Corr/Cov operations now return a MultiIndexed ``DataFrame`` rather than a ``Panel``, as ``Panel`` is now deprecated, see :ref:`here <whatsnew_0200.api_breaking.rolling_pairwise>`
- Support for S3 handling now uses ``s3fs``, see :ref:`here <whatsnew_0200.api_breaking.s3>`
- Google BigQuery support now uses the ``pandas-gbq`` library, see :ref:`here <whatsnew_0200.api_breaking.gbq>`
Expand Down Expand Up @@ -403,7 +404,7 @@ To convert a ``SparseDataFrame`` back to sparse SciPy matrix in COO format, you
Excel output for styled DataFrames
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Experimental support has been added to export ``DataFrame.style`` to Excel using the ``openpyxl`` engine. (:issue:`15530`)
Experimental support has been added to export ``DataFrame.style`` formats to Excel using the ``openpyxl`` engine. (:issue:`15530`)

For example, after running the following, ``styled.xlsx`` renders as below:

Expand All @@ -415,16 +416,24 @@ For example, after running the following, ``styled.xlsx`` renders as below:
columns=list('BCDE'))],
axis=1)
df.iloc[0, 2] = np.nan
df.style.\
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()]).\
to_excel('styled.xlsx', engine='openpyxl')
for v in s == s.max()])
styled
styled.to_excel('styled.xlsx', engine='openpyxl')

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

.. ipython:: python
:suppress:
import os
os.remove('styled.xlsx')

See the :ref:`Style documentation <style>` for more detail.

.. _whatsnew_0200.enhancements.intervalindex:

IntervalIndex
^^^^^^^^^^^^^

Expand Down

0 comments on commit 6168765

Please sign in to comment.