diff --git a/doc/source/reference/indexing.rst b/doc/source/reference/indexing.rst index 6d27e225b681e..8931caf394388 100644 --- a/doc/source/reference/indexing.rst +++ b/doc/source/reference/indexing.rst @@ -190,6 +190,9 @@ Numeric Index .. autosummary:: :toctree: api/ + RangeIndex.start + RangeIndex.stop + RangeIndex.step RangeIndex.from_range .. _api.categoricalindex: diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst index 92f62a812d23b..a061f696f4b30 100644 --- a/doc/source/reference/series.rst +++ b/doc/source/reference/series.rst @@ -473,6 +473,7 @@ strings and apply several methods to it. These can be accessed like Series.cat Series.dt Series.sparse + DataFrame.sparse Index.str .. _api.series.cat: diff --git a/doc/source/user_guide/sparse.rst b/doc/source/user_guide/sparse.rst index 09ed895a847ff..6ee11bd78fee9 100644 --- a/doc/source/user_guide/sparse.rst +++ b/doc/source/user_guide/sparse.rst @@ -77,6 +77,8 @@ A sparse array can be converted to a regular (dense) ndarray with :meth:`numpy.a np.asarray(sparr) +.. _sparse.dtype: + SparseDtype ----------- diff --git a/doc/source/whatsnew/v0.20.0.rst b/doc/source/whatsnew/v0.20.0.rst index 55b5f12d3ea70..8e6ad07ec8435 100644 --- a/doc/source/whatsnew/v0.20.0.rst +++ b/doc/source/whatsnew/v0.20.0.rst @@ -1564,7 +1564,7 @@ Removal of prior version deprecations/changes - The ``pandas.rpy`` module is removed. Similar functionality can be accessed through the `rpy2 `__ project. - See the :ref:`R interfacing docs `__ for more details. + See the `R interfacing docs `__ for more details. - The ``pandas.io.ga`` module with a ``google-analytics`` interface is removed (:issue:`11308`). Similar functionality can be found in the `Google2Pandas `__ package. - ``pd.to_datetime`` and ``pd.to_timedelta`` have dropped the ``coerce`` parameter in favor of ``errors`` (:issue:`13602`) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index ef406ce3d6b02..d2d0525a0a0ff 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6284,8 +6284,8 @@ def _gotitem(self, index (default) or the column axis. This behavior is different from `numpy` aggregation functions (`mean`, `median`, `prod`, `sum`, `std`, `var`), where the default is to compute the aggregation of the flattened - array, e.g., ``numpy.mean(arr_2d)`` as opposed to ``numpy.mean(arr_2d, - axis=0)``. + array, e.g., ``numpy.mean(arr_2d)`` as opposed to + ``numpy.mean(arr_2d, axis=0)``. `agg` is an alias for `aggregate`. Use the alias. diff --git a/pandas/core/strings.py b/pandas/core/strings.py index bd756491abd2f..619b49438cdbb 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -2360,13 +2360,13 @@ def cat(self, others=None, sep=None, na_rep=None, join=None): See Also -------- - Series.str.split : Split strings around given separator/delimiter. - Series.str.rsplit : Splits string around given separator/delimiter, - starting from the right. - Series.str.join : Join lists contained as elements in the Series/Index - with passed delimiter. - str.split : Standard library version for split. - str.rsplit : Standard library version for rsplit. + Series.str.split : Split strings around given separator/delimiter. + Series.str.rsplit : Splits string around given separator/delimiter, + starting from the right. + Series.str.join : Join lists contained as elements in the Series/Index + with passed delimiter. + str.split : Standard library version for split. + str.rsplit : Standard library version for rsplit. Notes ----- @@ -2383,7 +2383,12 @@ def cat(self, others=None, sep=None, na_rep=None, join=None): Examples -------- >>> s = pd.Series(["this is a regular sentence", - "https://docs.python.org/3/tutorial/index.html", np.nan]) + ... "https://docs.python.org/3/tutorial/index.html", + ... np.nan]) + 0 this is a regular sentence + 1 https://docs.python.org/3/tutorial/index.html + 2 NaN + dtype: object In the default setting, the string is split by whitespace. @@ -2434,7 +2439,6 @@ def cat(self, others=None, sep=None, na_rep=None, join=None): 0 this is a regular 1 https://docs.python.org/3/tutorial/index.html None None None 2 NaN NaN NaN NaN \ - 4 0 sentence 1 None diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 73119671550a5..8e6331fe44e6b 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -456,7 +456,7 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False, - If False returns ndarray of values. .. deprecated:: 0.25.0 - Use :meth:`.to_numpy` or :meth:`Timestamp.to_datetime64` + Use :meth:`Series.to_numpy` or :meth:`Timestamp.to_datetime64` instead to get an ndarray of values or numpy.datetime64, respectively. diff --git a/pandas/core/tools/timedeltas.py b/pandas/core/tools/timedeltas.py index 41dca3bfe7500..5e89b73c8754e 100644 --- a/pandas/core/tools/timedeltas.py +++ b/pandas/core/tools/timedeltas.py @@ -44,7 +44,7 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'): values of dtype timedelta64[ns]. .. deprecated:: 0.25.0 - Use :meth:`.to_numpy` or :meth:`Timedelta.to_timedelta64` + Use :meth:`Series.to_numpy` or :meth:`Timedelta.to_timedelta64` instead to get an ndarray of values or numpy.timedelta64, respectively.