Skip to content

More doc warnings #21808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ need to be:

.. ipython:: python

result = df1.append(df4)
result = df1.append(df4, sort=False)

.. ipython:: python
:suppress:
Expand Down Expand Up @@ -285,7 +285,7 @@ do this, use the ``ignore_index`` argument:

.. ipython:: python

result = pd.concat([df1, df4], ignore_index=True)
result = pd.concat([df1, df4], ignore_index=True, sort=False)

.. ipython:: python
:suppress:
Expand All @@ -299,7 +299,7 @@ This is also a valid argument to :meth:`DataFrame.append`:

.. ipython:: python

result = df1.append(df4, ignore_index=True)
result = df1.append(df4, ignore_index=True, sort=False)

.. ipython:: python
:suppress:
Expand Down
30 changes: 18 additions & 12 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,33 @@ Creating a ``Tick`` object (:class:`Day`, :class:`Hour`, :class:`Minute`,
`normalize=True` is no longer supported. This prevents unexpected behavior
where addition could fail to be monotone or associative. (:issue:`21427`)

.. ipython:: python
*Previous Behavior*:

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

Previous Behavior:

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

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

In [5]: ts + tic + tic + tic == ts + (tic + tic + tic)
Out [5]: False
In [4]: tic = pd.offsets.Hour(n=2, normalize=True)
...:

Current Behavior:
In [5]: tic
Out[5]: <2 * Hours>

In [6]: ts + tic
Out[6]: Timestamp('2018-06-11 00:00:00')

In [7]: ts + tic + tic + tic == ts + (tic + tic + tic)
Out[7]: False

*Current Behavior*:

.. ipython:: python

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

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ def encode(self, encoding, errors="strict"):
result = str_encode(self._data, encoding, errors)
return self._wrap_result(result)

_shared_docs['str_strip'] = ("""
_shared_docs['str_strip'] = (r"""
Remove leading and trailing characters.

Strip whitespaces (including newlines) or a set of specified characters
Expand Down