Skip to content

Commit 565df8d

Browse files
sameshlquintusdias
authored andcommitted
DOC:Remove DataFrame.append from the 10min intro (pandas-dev#27520)
* DOC:Remove DataFrame.append from the 10min intro Remove the `append` section from 10 min intro doc as complexity of that is very different than `list.append` closes pandas-dev#27518
1 parent 232d81f commit 565df8d

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

doc/source/getting_started/10min.rst

+7-15
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,13 @@ Concatenating pandas objects together with :func:`concat`:
468468
469469
pd.concat(pieces)
470470
471+
.. note::
472+
Adding a column to a ``DataFrame`` is relatively fast. However, adding
473+
a row requires a copy, and may be expensive. We recommend passing a
474+
pre-built list of records to the ``DataFrame`` constructor instead
475+
of building a ``DataFrame`` by iteratively appending records to it.
476+
See :ref:`Appending to dataframe <merging.concatenation>` for more.
477+
471478
Join
472479
~~~~
473480

@@ -491,21 +498,6 @@ Another example that can be given is:
491498
right
492499
pd.merge(left, right, on='key')
493500
494-
495-
Append
496-
~~~~~~
497-
498-
Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
499-
section.
500-
501-
.. ipython:: python
502-
503-
df = pd.DataFrame(np.random.randn(8, 4), columns=['A', 'B', 'C', 'D'])
504-
df
505-
s = df.iloc[3]
506-
df.append(s, ignore_index=True)
507-
508-
509501
Grouping
510502
--------
511503

0 commit comments

Comments
 (0)