Skip to content

DOC: Remove various warnings from doc build #16206

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

Merged
merged 3 commits into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ Transform the entire frame. ``.transform()`` allows input functions as: a numpy
function name or a user defined function.

.. ipython:: python
:okwarning:

tsdf.transform(np.abs)
tsdf.transform('abs')
Expand Down Expand Up @@ -1055,6 +1056,7 @@ Passing a dict of lists will generate a multi-indexed DataFrame with these
selective transforms.

.. ipython:: python
:okwarning:

tsdf.transform({'A': np.abs, 'B': [lambda x: x+1, 'sqrt']})

Expand Down
3 changes: 2 additions & 1 deletion doc/source/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,8 @@ You can use the same approach to read all files matching a pattern. Here is an
Finally, this strategy will work with the other ``pd.read_*(...)`` functions described in the :ref:`io docs<io>`.

.. ipython:: python
:supress:
:suppress:

for i in range(3):
os.remove('file_{}.csv'.format(i))

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.19.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ Other enhancements
df.resample('M', on='date').sum()
df.resample('M', level='d').sum()

- The ``.get_credentials()`` method of ``GbqConnector`` can now first try to fetch `the application default credentials <https://developers.google.com/identity/protocols/application-default-credentials>`__. See the :ref:`docs <io.bigquery_authentication>` for more details (:issue:`13577`).
- The ``.get_credentials()`` method of ``GbqConnector`` can now first try to fetch `the application default credentials <https://developers.google.com/identity/protocols/application-default-credentials>`__. See the docs for more details (:issue:`13577`).
- The ``.tz_localize()`` method of ``DatetimeIndex`` and ``Timestamp`` has gained the ``errors`` keyword, so you can potentially coerce nonexistent timestamps to ``NaT``. The default behavior remains to raising a ``NonExistentTimeError`` (:issue:`13057`)
- ``.to_hdf/read_hdf()`` now accept path objects (e.g. ``pathlib.Path``, ``py.path.local``) for the file path (:issue:`11773`)
- The ``pd.read_csv()`` with ``engine='python'`` has gained support for the
Expand Down
35 changes: 19 additions & 16 deletions doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ of all unique functions. Those that are not noted for a particular column will b
The API also supports a ``.transform()`` function to provide for broadcasting results.

.. ipython:: python
:okwarning:

df.transform(['abs', lambda x: x - x.min()])

Expand Down Expand Up @@ -373,26 +374,28 @@ Experimental support has been added to export ``DataFrame.style`` formats to Exc
For example, after running the following, ``styled.xlsx`` renders as below:

.. ipython:: python
:okwarning:

np.random.seed(24)
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
df = pd.concat([df, pd.DataFrame(np.random.RandomState(24).randn(10, 4),
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.to_excel('styled.xlsx', engine='openpyxl')
np.random.seed(24)
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
df = pd.concat([df, pd.DataFrame(np.random.RandomState(24).randn(10, 4),
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.to_excel('styled.xlsx', engine='openpyxl')

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

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

import os
os.remove('styled.xlsx')

See the :ref:`Style documentation <style.ipynb#Export-to-Excel>` for more detail.

Expand Down Expand Up @@ -490,7 +493,7 @@ Other Enhancements
- ``Series.interpolate()`` now supports timedelta as an index type with ``method='time'`` (:issue:`6424`)
- Addition of a ``level`` keyword to ``DataFrame/Series.rename`` to rename
labels in the specified level of a MultiIndex (:issue:`4160`).
- ``DataFrame.reset_index()`` will now interpret a tuple ``index.name`` as a key spanning across levels of ``columns``, if this is a ``MultiIndex`` (:issues:`16164`)
- ``DataFrame.reset_index()`` will now interpret a tuple ``index.name`` as a key spanning across levels of ``columns``, if this is a ``MultiIndex`` (:issue:`16164`)
- ``Timedelta.isoformat`` method added for formatting Timedeltas as an `ISO 8601 duration`_. See the :ref:`Timedelta docs <timedeltas.isoformat>` (:issue:`15136`)
- ``.select_dtypes()`` now allows the string ``datetimetz`` to generically select datetimes with tz (:issue:`14910`)
- The ``.to_latex()`` method will now accept ``multicolumn`` and ``multirow`` arguments to use the accompanying LaTeX enhancements
Expand Down
2 changes: 0 additions & 2 deletions doc/source/whatsnew/v0.8.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ New plotting methods

fx['FR'].plot(style='g')

@savefig whatsnew_secondary_y.png
fx['IT'].plot(style='k--', secondary_y=True)

Vytautas Jancauskas, the 2012 GSOC participant, has added many new plot
Expand All @@ -180,7 +179,6 @@ types. For example, ``'kde'`` is a new option:
np.random.randn(1000) * 0.5 + 3)))
plt.figure()
s.hist(normed=True, alpha=0.2)
@savefig whatsnew_kde.png
s.plot(kind='kde')

See :ref:`the plotting page <visualization.other>` for much more.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class IntervalIndex(IntervalMixin, Index):

.. versionadded:: 0.20.0

Properties
Attributes
----------
left, right : array-like (1-dimensional)
Left and right bounds for each interval.
Expand Down
2 changes: 2 additions & 0 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,9 @@ def bar(self, subset=None, axis=0, color='#d65f5f', width=100,
"""
Color the background ``color`` proptional to the values in each column.
Excludes non-numeric data by default.

.. versionadded:: 0.17.1

Parameters
----------
subset: IndexSlice, default None
Expand Down