Skip to content

Commit 5cb5880

Browse files
TomAugspurgerjreback
authored andcommitted
DOC: Bunch o warnings (#21805)
1 parent bfa4169 commit 5cb5880

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

doc/source/extending.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ on :ref:`ecosystem.extensions`.
8080
The interface consists of two classes.
8181

8282
:class:`~pandas.api.extensions.ExtensionDtype`
83-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8484

8585
A :class:`pandas.api.extensions.ExtensionDtype` is similar to a ``numpy.dtype`` object. It describes the
8686
data type. Implementors are responsible for a few unique items like the name.
@@ -124,7 +124,7 @@ and comments contain guidance for properly implementing the interface.
124124
.. _extending.extension.operator:
125125

126126
:class:`~pandas.api.extensions.ExtensionArray` Operator Support
127-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128128

129129
.. versionadded:: 0.24.0
130130

doc/source/text.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ All one-dimensional list-likes can be arbitrarily combined in a list-like contai
312312
313313
s
314314
u
315-
s.str.cat([u, u.values, ['A', 'B', 'C', 'D'], map(str, u.index)], na_rep='-')
315+
s.str.cat([u.values, ['A', 'B', 'C', 'D'], map(str, u.index)], na_rep='-')
316316
317317
All elements must match in length to the calling ``Series`` (or ``Index``), except those having an index if ``join`` is not None:
318318

doc/source/whatsnew/v0.23.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ for storing ip addresses.
202202
...:
203203

204204
``IPArray`` isn't a normal 1-D NumPy array, but because it's a pandas
205-
:class:`~pandas.api.extension.ExtensionArray`, it can be stored properly inside pandas' containers.
205+
:class:`~pandas.api.extensions.ExtensionArray`, it can be stored properly inside pandas' containers.
206206

207207
.. code-block:: ipython
208208

doc/source/whatsnew/v0.24.0.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Other Enhancements
8181
(:issue:`21627`)
8282
- New method :meth:`HDFStore.walk` will recursively walk the group hierarchy of an HDF5 file (:issue:`10932`)
8383
- :func:`read_html` copies cell data across ``colspan``s and ``rowspan``s, and it treats all-``th`` table rows as headers if ``header`` kwarg is not given and there is no ``thead`` (:issue:`17054`)
84-
- :meth:`Series.nlargest`, :meth:`Series.nsmallest`, :meth:`DataFrame.nlargest`, and :meth:`DataFrame.nsmallest` now accept the value ``"all"`` for the ``keep` argument. This keeps all ties for the nth largest/smallest value (:issue:`16818`)
84+
- :meth:`Series.nlargest`, :meth:`Series.nsmallest`, :meth:`DataFrame.nlargest`, and :meth:`DataFrame.nsmallest` now accept the value ``"all"`` for the ``keep`` argument. This keeps all ties for the nth largest/smallest value (:issue:`16818`)
8585
- :class:`IntervalIndex` has gained the :meth:`~IntervalIndex.set_closed` method to change the existing ``closed`` value (:issue:`21670`)
8686
-
8787

@@ -183,15 +183,8 @@ ExtensionType Changes
183183
- :meth:`Series.combine()` with scalar argument now works for any function type (:issue:`21248`)
184184
-
185185

186-
.. _whatsnew_0240.api.other:
187-
188-
Other API Changes
189-
^^^^^^^^^^^^^^^^^
190-
191186
.. _whatsnew_0240.api.incompatibilities:
192187

193-
- Trying to reindex a ``DataFrame`` with a non unique ``MultiIndex`` now raises a ``ValueError`` instead of an ``Exception`` (:issue:`21770`)
194-
195188
Series and Index Data-Dtype Incompatibilities
196189
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197190

@@ -231,7 +224,7 @@ Other API Changes
231224

232225
- :class:`DatetimeIndex` now accepts :class:`Int64Index` arguments as epoch timestamps (:issue:`20997`)
233226
- Invalid construction of ``IntervalDtype`` will now always raise a ``TypeError`` rather than a ``ValueError`` if the subdtype is invalid (:issue:`21185`)
234-
-
227+
- Trying to reindex a ``DataFrame`` with a non unique ``MultiIndex`` now raises a ``ValueError`` instead of an ``Exception`` (:issue:`21770`)
235228
-
236229

237230
.. _whatsnew_0240.deprecations:

pandas/core/frame.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -4199,15 +4199,17 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None,
41994199
* 1, or 'columns' : Drop columns which contain missing value.
42004200
42014201
.. deprecated:: 0.23.0
4202-
Pass tuple or list to drop on multiple axes.
4203-
Only a single axis is allowed.
4202+
4203+
Pass tuple or list to drop on multiple axes.
4204+
Only a single axis is allowed.
42044205
42054206
how : {'any', 'all'}, default 'any'
42064207
Determine if row or column is removed from DataFrame, when we have
42074208
at least one NA or all NA.
42084209
42094210
* 'any' : If any NA values are present, drop that row or column.
42104211
* 'all' : If all values are NA, drop that row or column.
4212+
42114213
thresh : int, optional
42124214
Require that many non-NA values.
42134215
subset : array-like, optional
@@ -4676,10 +4678,11 @@ def nsmallest(self, n, columns, keep='first'):
46764678
Column name or names to order by
46774679
keep : {'first', 'last', 'all'}, default 'first'
46784680
Where there are duplicate values:
4681+
46794682
- ``first`` : take the first occurrence.
46804683
- ``last`` : take the last occurrence.
46814684
- ``all`` : do not drop any duplicates, even it means
4682-
selecting more than `n` items.
4685+
selecting more than `n` items.
46834686
46844687
.. versionadded:: 0.24.0
46854688

pandas/core/indexes/datetimes.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1879,6 +1879,7 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
18791879
remove the time zone information preserving local time.
18801880
ambiguous : str {'infer', 'NaT', 'raise'} or bool array,
18811881
default 'raise'
1882+
18821883
- 'infer' will attempt to infer fall dst-transition hours based on
18831884
order
18841885
- bool-ndarray where True signifies a DST time, False signifies a
@@ -1887,10 +1888,12 @@ def tz_localize(self, tz, ambiguous='raise', errors='raise'):
18871888
- 'NaT' will return NaT where there are ambiguous times
18881889
- 'raise' will raise an AmbiguousTimeError if there are ambiguous
18891890
times
1891+
18901892
errors : {'raise', 'coerce'}, default 'raise'
1893+
18911894
- 'raise' will raise a NonExistentTimeError if a timestamp is not
1892-
valid in the specified time zone (e.g. due to a transition from
1893-
or to DST time)
1895+
valid in the specified time zone (e.g. due to a transition from
1896+
or to DST time)
18941897
- 'coerce' will return NaT if the timestamp can not be converted
18951898
to the specified time zone
18961899

0 commit comments

Comments
 (0)