Skip to content

Commit 1986dbe

Browse files
TomAugspurgerjreback
authored andcommitted
More warnings (#21808)
1 parent e2800fa commit 1986dbe

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

doc/source/merging.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ need to be:
245245

246246
.. ipython:: python
247247
248-
result = df1.append(df4)
248+
result = df1.append(df4, sort=False)
249249
250250
.. ipython:: python
251251
:suppress:
@@ -285,7 +285,7 @@ do this, use the ``ignore_index`` argument:
285285

286286
.. ipython:: python
287287
288-
result = pd.concat([df1, df4], ignore_index=True)
288+
result = pd.concat([df1, df4], ignore_index=True, sort=False)
289289
290290
.. ipython:: python
291291
:suppress:
@@ -299,7 +299,7 @@ This is also a valid argument to :meth:`DataFrame.append`:
299299

300300
.. ipython:: python
301301
302-
result = df1.append(df4, ignore_index=True)
302+
result = df1.append(df4, ignore_index=True, sort=False)
303303
304304
.. ipython:: python
305305
:suppress:

doc/source/whatsnew/v0.24.0.txt

+18-12
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,33 @@ Creating a ``Tick`` object (:class:`Day`, :class:`Hour`, :class:`Minute`,
100100
`normalize=True` is no longer supported. This prevents unexpected behavior
101101
where addition could fail to be monotone or associative. (:issue:`21427`)
102102

103-
.. ipython:: python
103+
*Previous Behavior*:
104104

105-
ts = pd.Timestamp('2018-06-11 18:01:14')
106-
ts
107-
tic = pd.offsets.Hour(n=2, normalize=True)
108-
tic
105+
.. code-block:: ipython
109106

110-
Previous Behavior:
111107

112-
.. code-block:: ipython
108+
In [2]: ts = pd.Timestamp('2018-06-11 18:01:14')
113109

114-
In [4]: ts + tic
115-
Out [4]: Timestamp('2018-06-11 00:00:00')
110+
In [3]: ts
111+
Out[3]: Timestamp('2018-06-11 18:01:14')
116112

117-
In [5]: ts + tic + tic + tic == ts + (tic + tic + tic)
118-
Out [5]: False
113+
In [4]: tic = pd.offsets.Hour(n=2, normalize=True)
114+
...:
119115

120-
Current Behavior:
116+
In [5]: tic
117+
Out[5]: <2 * Hours>
118+
119+
In [6]: ts + tic
120+
Out[6]: Timestamp('2018-06-11 00:00:00')
121+
122+
In [7]: ts + tic + tic + tic == ts + (tic + tic + tic)
123+
Out[7]: False
124+
125+
*Current Behavior*:
121126

122127
.. ipython:: python
123128

129+
ts = pd.Timestamp('2018-06-11 18:01:14')
124130
tic = pd.offsets.Hour(n=2)
125131
ts + tic + tic + tic == ts + (tic + tic + tic)
126132

pandas/core/strings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ def encode(self, encoding, errors="strict"):
25562556
result = str_encode(self._data, encoding, errors)
25572557
return self._wrap_result(result)
25582558

2559-
_shared_docs['str_strip'] = ("""
2559+
_shared_docs['str_strip'] = (r"""
25602560
Remove leading and trailing characters.
25612561
25622562
Strip whitespaces (including newlines) or a set of specified characters

0 commit comments

Comments
 (0)