Skip to content

Commit dcba7a5

Browse files
datapythonistajorisvandenbossche
authored andcommitted
DOC: Fixing more doc warnings (#26826)
1 parent d66da60 commit dcba7a5

File tree

8 files changed

+24
-14
lines changed

8 files changed

+24
-14
lines changed

doc/source/reference/indexing.rst

+3
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ Numeric Index
190190
.. autosummary::
191191
:toctree: api/
192192

193+
RangeIndex.start
194+
RangeIndex.stop
195+
RangeIndex.step
193196
RangeIndex.from_range
194197

195198
.. _api.categoricalindex:

doc/source/reference/series.rst

+1
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ strings and apply several methods to it. These can be accessed like
473473
Series.cat
474474
Series.dt
475475
Series.sparse
476+
DataFrame.sparse
476477
Index.str
477478

478479
.. _api.series.cat:

doc/source/user_guide/sparse.rst

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ A sparse array can be converted to a regular (dense) ndarray with :meth:`numpy.a
7777
np.asarray(sparr)
7878
7979
80+
.. _sparse.dtype:
81+
8082
SparseDtype
8183
-----------
8284

doc/source/whatsnew/v0.20.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -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 <https://pandas.pydata.org/pandas-docs/version/0.20/r_interface.html>`__ for more details.
1567+
See the `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`)

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6284,8 +6284,8 @@ def _gotitem(self,
62846284
index (default) or the column axis. This behavior is different from
62856285
`numpy` aggregation functions (`mean`, `median`, `prod`, `sum`, `std`,
62866286
`var`), where the default is to compute the aggregation of the flattened
6287-
array, e.g., ``numpy.mean(arr_2d)`` as opposed to ``numpy.mean(arr_2d,
6288-
axis=0)``.
6287+
array, e.g., ``numpy.mean(arr_2d)`` as opposed to
6288+
``numpy.mean(arr_2d, axis=0)``.
62896289
62906290
`agg` is an alias for `aggregate`. Use the alias.
62916291

pandas/core/strings.py

+13-9
Original file line numberDiff line numberDiff line change
@@ -2360,13 +2360,13 @@ def cat(self, others=None, sep=None, na_rep=None, join=None):
23602360
23612361
See Also
23622362
--------
2363-
Series.str.split : Split strings around given separator/delimiter.
2364-
Series.str.rsplit : Splits string around given separator/delimiter,
2365-
starting from the right.
2366-
Series.str.join : Join lists contained as elements in the Series/Index
2367-
with passed delimiter.
2368-
str.split : Standard library version for split.
2369-
str.rsplit : Standard library version for rsplit.
2363+
Series.str.split : Split strings around given separator/delimiter.
2364+
Series.str.rsplit : Splits string around given separator/delimiter,
2365+
starting from the right.
2366+
Series.str.join : Join lists contained as elements in the Series/Index
2367+
with passed delimiter.
2368+
str.split : Standard library version for split.
2369+
str.rsplit : Standard library version for rsplit.
23702370
23712371
Notes
23722372
-----
@@ -2383,7 +2383,12 @@ def cat(self, others=None, sep=None, na_rep=None, join=None):
23832383
Examples
23842384
--------
23852385
>>> s = pd.Series(["this is a regular sentence",
2386-
"https://docs.python.org/3/tutorial/index.html", np.nan])
2386+
... "https://docs.python.org/3/tutorial/index.html",
2387+
... np.nan])
2388+
0 this is a regular sentence
2389+
1 https://docs.python.org/3/tutorial/index.html
2390+
2 NaN
2391+
dtype: object
23872392
23882393
In the default setting, the string is split by whitespace.
23892394
@@ -2434,7 +2439,6 @@ def cat(self, others=None, sep=None, na_rep=None, join=None):
24342439
0 this is a regular
24352440
1 https://docs.python.org/3/tutorial/index.html None None None
24362441
2 NaN NaN NaN NaN \
2437-
24382442
4
24392443
0 sentence
24402444
1 None

pandas/core/tools/datetimes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
456456
- If False returns ndarray of values.
457457
458458
.. deprecated:: 0.25.0
459-
Use :meth:`.to_numpy` or :meth:`Timestamp.to_datetime64`
459+
Use :meth:`Series.to_numpy` or :meth:`Timestamp.to_datetime64`
460460
instead to get an ndarray of values or numpy.datetime64,
461461
respectively.
462462

pandas/core/tools/timedeltas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
4444
values of dtype timedelta64[ns].
4545
4646
.. deprecated:: 0.25.0
47-
Use :meth:`.to_numpy` or :meth:`Timedelta.to_timedelta64`
47+
Use :meth:`Series.to_numpy` or :meth:`Timedelta.to_timedelta64`
4848
instead to get an ndarray of values or numpy.timedelta64,
4949
respectively.
5050

0 commit comments

Comments
 (0)