Skip to content

Commit b72a4ff

Browse files
datapythonistajorisvandenbossche
authored andcommitted
DOC: Fixing some doc warnings (#26786)
1 parent 129aaea commit b72a4ff

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

doc/source/reference/series.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ strings and apply several methods to it. These can be accessed like
472472
Series.str
473473
Series.cat
474474
Series.dt
475+
Series.sparse
475476
Index.str
476477

477478
.. _api.series.cat:

doc/source/user_guide/missing_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ at the new values.
466466
.. _missing_data.interp_limits:
467467

468468
Interpolation Limits
469-
^^^^^^^^^^^^^^^^^^^^
469+
--------------------
470470

471471
Like other pandas fill methods, :meth:`~DataFrame.interpolate` accepts a ``limit`` keyword
472472
argument. Use this argument to limit the number of consecutive ``NaN`` values

doc/source/user_guide/reshaping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ handling of NaN:
705705
you can use ``df["cat_col"] = pd.Categorical(df["col"])`` or
706706
``df["cat_col"] = df["col"].astype("category")``. For full docs on :class:`~pandas.Categorical`,
707707
see the :ref:`Categorical introduction <categorical>` and the
708-
:ref:`API documentation <api.categorical>`.
708+
:ref:`API documentation <api.arrays.categorical>`.
709709

710710
Examples
711711
--------

doc/source/whatsnew/v0.20.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ IntervalIndex
396396

397397
pandas has gained an ``IntervalIndex`` with its own dtype, ``interval`` as well as the ``Interval`` scalar type. These allow first-class support for interval
398398
notation, specifically as a return type for the categories in :func:`cut` and :func:`qcut`. The ``IntervalIndex`` allows some unique indexing, see the
399-
:ref:`docs <indexing.intervallindex>`. (:issue:`7640`, :issue:`8625`)
399+
:ref:`docs <advanced.intervalindex>`. (:issue:`7640`, :issue:`8625`)
400400

401401
.. warning::
402402

@@ -1564,7 +1564,7 @@ Removal of prior version deprecations/changes
15641564

15651565
- The ``pandas.rpy`` module is removed. Similar functionality can be accessed
15661566
through the `rpy2 <https://rpy2.readthedocs.io/>`__ project.
1567-
See the :ref:`R interfacing docs <rpy>` for more details.
1567+
See the :ref:`R interfacing docs <https://pandas.pydata.org/pandas-docs/version/0.20/r_interface.html>`__ for more details.
15681568
- The ``pandas.io.ga`` module with a ``google-analytics`` interface is removed (:issue:`11308`).
15691569
Similar functionality can be found in the `Google2Pandas <https://github.com/panalysis/Google2Pandas>`__ package.
15701570
- ``pd.to_datetime`` and ``pd.to_timedelta`` have dropped the ``coerce`` parameter in favor of ``errors`` (:issue:`13602`)

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ column selection, the values can just be the functions to apply
7272
This type of aggregation is the recommended alternative to the deprecated behavior when passing
7373
a dict to a Series groupby aggregation (:ref:`whatsnew_0200.api_breaking.deprecate_group_agg_dict`).
7474

75-
See :ref:`_groupby.aggregate.named` for more.
75+
See :ref:`groupby.aggregate.named` for more.
7676

7777
.. _whatsnew_0250.enhancements.other:
7878

pandas/core/arrays/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class TimelikeOps:
212212
213213
.. versionadded:: 0.24.0
214214
215-
nonexistent : 'shift_forward', 'shift_backward, 'NaT', timedelta, \
215+
nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta, \
216216
default 'raise'
217217
A nonexistent time does not exist in a particular timezone
218218
where clocks moved forward due to DST.

pandas/core/generic.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10283,8 +10283,8 @@ def _doc_parms(cls):
1028310283
Returns
1028410284
-------
1028510285
%(name1)s or %(name2)s (if level specified)\
10286-
%(see_also)s
10287-
%(examples)s\
10286+
%(see_also)s\
10287+
%(examples)s
1028810288
"""
1028910289

1029010290
_num_ddof_doc = """
@@ -10427,7 +10427,8 @@ def _doc_parms(cls):
1042710427
1042810428
Returns
1042910429
-------
10430-
%(name1)s or %(name2)s\n
10430+
%(name1)s or %(name2)s
10431+
1043110432
See Also
1043210433
--------
1043310434
core.window.Expanding.%(accum_func_name)s : Similar functionality
@@ -10788,10 +10789,10 @@ def _doc_parms(cls):
1078810789
Series([], dtype: bool)
1078910790
"""
1079010791

10791-
_shared_docs['stat_func_example'] = """\
10792+
_shared_docs['stat_func_example'] = """
10793+
1079210794
Examples
1079310795
--------
10794-
1079510796
>>> idx = pd.MultiIndex.from_arrays([
1079610797
... ['warm', 'warm', 'cold', 'cold'],
1079710798
... ['dog', 'falcon', 'fish', 'spider']],
@@ -10820,8 +10821,7 @@ def _doc_parms(cls):
1082010821
blooded
1082110822
warm {level_output_0}
1082210823
cold {level_output_1}
10823-
Name: legs, dtype: int64
10824-
"""
10824+
Name: legs, dtype: int64"""
1082510825

1082610826
_sum_examples = _shared_docs['stat_func_example'].format(
1082710827
stat_func='sum',
@@ -10831,6 +10831,7 @@ def _doc_parms(cls):
1083110831
level_output_1=8)
1083210832

1083310833
_sum_examples += """
10834+
1083410835
By default, the sum of an empty or all-NA Series is ``0``.
1083510836
1083610837
>>> pd.Series([]).sum() # min_count=0 is the default
@@ -10849,8 +10850,7 @@ def _doc_parms(cls):
1084910850
0.0
1085010851
1085110852
>>> pd.Series([np.nan]).sum(min_count=1)
10852-
nan
10853-
"""
10853+
nan"""
1085410854

1085510855
_max_examples = _shared_docs['stat_func_example'].format(
1085610856
stat_func='max',
@@ -10879,10 +10879,10 @@ def _doc_parms(cls):
1087910879
DataFrame.min : Return the minimum over the requested axis.
1088010880
DataFrame.max : Return the maximum over the requested axis.
1088110881
DataFrame.idxmin : Return the index of the minimum over the requested axis.
10882-
DataFrame.idxmax : Return the index of the maximum over the requested axis.
10883-
"""
10882+
DataFrame.idxmax : Return the index of the maximum over the requested axis."""
10883+
10884+
_prod_examples = """
1088410885
10885-
_prod_examples = """\
1088610886
Examples
1088710887
--------
1088810888
By default, the product of an empty or all-NA Series is ``1``
@@ -10902,8 +10902,7 @@ def _doc_parms(cls):
1090210902
1.0
1090310903
1090410904
>>> pd.Series([np.nan]).prod(min_count=1)
10905-
nan
10906-
"""
10905+
nan"""
1090710906

1090810907
_min_count_stub = """\
1090910908
min_count : int, default 0

0 commit comments

Comments
 (0)