Skip to content

Commit

Permalink
Merge pull request #8488 from hunterowens/speed-docs
Browse files Browse the repository at this point in the history
DOC: warning about copying for df.append/concat. Fixes #7967
  • Loading branch information
jreback committed Oct 6, 2014
2 parents 795e059 + 00fb38e commit d65c9d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ takes a list or dict of homogeneously-typed objects and concatenates them with
some configurable handling of "what to do with the other axes":

::

concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False,
keys=None, levels=None, names=None, verify_integrity=False)

Expand Down Expand Up @@ -100,6 +99,18 @@ means that we can now do stuff like select out each chunk by key:
It's not a stretch to see how this can be very useful. More detail on this
functionality below.

.. note::
It is worth noting however, that ``concat`` (and therefore ``append``) makes
a full copy of the data, and that constantly reusing this function can
create a signifcant performance hit. If you need to use the operation over
several datasets, use a list comprehension.

::
frames = [ process_your_file(f) for f in files ]
result = pd.concat(frames)


Set logic on the other axes
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit d65c9d7

Please sign in to comment.