Skip to content

Commit 9051f0d

Browse files
DOC: Remove various warnings from doc build (#16206)
* DOC: start fixing warnings * DOC: Remove various warnings from doc build * fixup advanced
1 parent f154966 commit 9051f0d

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

doc/source/basics.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ Transform the entire frame. ``.transform()`` allows input functions as: a numpy
10041004
function name or a user defined function.
10051005

10061006
.. ipython:: python
1007+
:okwarning:
10071008
10081009
tsdf.transform(np.abs)
10091010
tsdf.transform('abs')
@@ -1055,6 +1056,7 @@ Passing a dict of lists will generate a multi-indexed DataFrame with these
10551056
selective transforms.
10561057

10571058
.. ipython:: python
1059+
:okwarning:
10581060
10591061
tsdf.transform({'A': np.abs, 'B': [lambda x: x+1, 'sqrt']})
10601062

doc/source/cookbook.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,8 @@ You can use the same approach to read all files matching a pattern. Here is an
968968
Finally, this strategy will work with the other ``pd.read_*(...)`` functions described in the :ref:`io docs<io>`.
969969

970970
.. ipython:: python
971-
:supress:
971+
:suppress:
972+
972973
for i in range(3):
973974
os.remove('file_{}.csv'.format(i))
974975

doc/source/whatsnew/v0.19.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ Other enhancements
479479
df.resample('M', on='date').sum()
480480
df.resample('M', level='d').sum()
481481

482-
- 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`).
482+
- 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`).
483483
- 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`)
484484
- ``.to_hdf/read_hdf()`` now accept path objects (e.g. ``pathlib.Path``, ``py.path.local``) for the file path (:issue:`11773`)
485485
- The ``pd.read_csv()`` with ``engine='python'`` has gained support for the

doc/source/whatsnew/v0.20.0.txt

+19-16
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ of all unique functions. Those that are not noted for a particular column will b
8383
The API also supports a ``.transform()`` function to provide for broadcasting results.
8484

8585
.. ipython:: python
86+
:okwarning:
8687

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

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

375376
.. ipython:: python
377+
:okwarning:
376378

377-
np.random.seed(24)
378-
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
379-
df = pd.concat([df, pd.DataFrame(np.random.RandomState(24).randn(10, 4),
380-
columns=list('BCDE'))],
381-
axis=1)
382-
df.iloc[0, 2] = np.nan
383-
df
384-
styled = df.style.\
385-
applymap(lambda val: 'color: %s' % 'red' if val < 0 else 'black').\
386-
apply(lambda s: ['background-color: yellow' if v else ''
387-
for v in s == s.max()])
388-
styled.to_excel('styled.xlsx', engine='openpyxl')
379+
np.random.seed(24)
380+
df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
381+
df = pd.concat([df, pd.DataFrame(np.random.RandomState(24).randn(10, 4),
382+
columns=list('BCDE'))],
383+
axis=1)
384+
df.iloc[0, 2] = np.nan
385+
df
386+
styled = df.style.\
387+
applymap(lambda val: 'color: %s' % 'red' if val < 0 else 'black').\
388+
apply(lambda s: ['background-color: yellow' if v else ''
389+
for v in s == s.max()])
390+
styled.to_excel('styled.xlsx', engine='openpyxl')
389391

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

392394
.. ipython:: python
393-
:suppress:
394-
import os
395-
os.remove('styled.xlsx')
395+
:suppress:
396+
397+
import os
398+
os.remove('styled.xlsx')
396399

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

@@ -490,7 +493,7 @@ Other Enhancements
490493
- ``Series.interpolate()`` now supports timedelta as an index type with ``method='time'`` (:issue:`6424`)
491494
- Addition of a ``level`` keyword to ``DataFrame/Series.rename`` to rename
492495
labels in the specified level of a MultiIndex (:issue:`4160`).
493-
- ``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`)
496+
- ``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`)
494497
- ``Timedelta.isoformat`` method added for formatting Timedeltas as an `ISO 8601 duration`_. See the :ref:`Timedelta docs <timedeltas.isoformat>` (:issue:`15136`)
495498
- ``.select_dtypes()`` now allows the string ``datetimetz`` to generically select datetimes with tz (:issue:`14910`)
496499
- The ``.to_latex()`` method will now accept ``multicolumn`` and ``multirow`` arguments to use the accompanying LaTeX enhancements

doc/source/whatsnew/v0.8.0.txt

-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ New plotting methods
168168

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

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

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

186184
See :ref:`the plotting page <visualization.other>` for much more.

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class IntervalIndex(IntervalMixin, Index):
9999
100100
.. versionadded:: 0.20.0
101101
102-
Properties
102+
Attributes
103103
----------
104104
left, right : array-like (1-dimensional)
105105
Left and right bounds for each interval.

pandas/io/formats/style.py

+2
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,9 @@ def bar(self, subset=None, axis=0, color='#d65f5f', width=100,
982982
"""
983983
Color the background ``color`` proptional to the values in each column.
984984
Excludes non-numeric data by default.
985+
985986
.. versionadded:: 0.17.1
987+
986988
Parameters
987989
----------
988990
subset: IndexSlice, default None

0 commit comments

Comments
 (0)