Skip to content

DOC:Remove DataFrame.append from the 10min intro #27520

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 7 commits into from
Aug 2, 2019
Merged
Changes from 4 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
22 changes: 7 additions & 15 deletions doc/source/getting_started/10min.rst
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ Concatenating pandas objects together with :func:`concat`:

pd.concat(pieces)

.. note::
Adding a column to a DataFrame is relatively fast. Adding a row, however,
requires a full copy of the data and a construction of a new Index, which
Copy link
Contributor

Choose a reason for hiding this comment

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

use double-backticks around DataFrame. Also let's make this shorter / simpler.

first part do something like

Adding a column to a DataFrame is relatively fast, However, adding a row requires a copy, and may be expensive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jreback Done. Let me know if any more changes are required.

may be expensive. Rather than iteratively building a DataFrame by
appending records, we recommend passing the pre-built list of records
to the DataFrame constructor. See :ref:`Appending to dataframe <merging.concatenation>` for more.

Join
~~~~

Expand All @@ -491,21 +498,6 @@ Another example that can be given is:
right
pd.merge(left, right, on='key')


Append
~~~~~~

Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
section.

.. ipython:: python

df = pd.DataFrame(np.random.randn(8, 4), columns=['A', 'B', 'C', 'D'])
df
s = df.iloc[3]
df.append(s, ignore_index=True)


Grouping
--------

Expand Down