Skip to content

DOC: remove outdated doc closes #31487 #36797

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
Oct 2, 2020
Merged
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
25 changes: 0 additions & 25 deletions doc/source/user_guide/dsintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -663,31 +663,6 @@ row-wise. For example:

df - df.iloc[0]

In the special case of working with time series data, if the DataFrame index
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than delete this, would it be appropriate to keep the example but use df.sub(df['A'], axis=0) to show an example of column-wise arithmetic. or is this covered elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line just below this points the <basics.binop> docs which i think do this pretty well

contains dates, the broadcasting will be column-wise:

.. ipython:: python
:okwarning:

index = pd.date_range('1/1/2000', periods=8)
df = pd.DataFrame(np.random.randn(8, 3), index=index, columns=list('ABC'))
df
type(df['A'])
df - df['A']

.. warning::

.. code-block:: python

df - df['A']

is now deprecated and will be removed in a future release. The preferred way
to replicate this behavior is

.. code-block:: python

df.sub(df['A'], axis=0)

For explicit control over the matching and broadcasting behavior, see the
section on :ref:`flexible binary operations <basics.binop>`.

Expand Down