Skip to content

Commit 00fb38e

Browse files
committed
DOC: warning about copying for df.append/concat. Fixes pandas-dev#7967
updating concat section to reflex comments on PR pandas-dev#8488 DOC: placing the concat notes in a .. note:: block. pandas-dev#8488 DOC: Minor formatting changes for pandas-dev#8488
1 parent 795e059 commit 00fb38e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

doc/source/merging.rst

+12-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ takes a list or dict of homogeneously-typed objects and concatenates them with
5151
some configurable handling of "what to do with the other axes":
5252

5353
::
54-
5554
concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False,
5655
keys=None, levels=None, names=None, verify_integrity=False)
5756

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

102+
.. note::
103+
It is worth noting however, that ``concat`` (and therefore ``append``) makes
104+
a full copy of the data, and that constantly reusing this function can
105+
create a signifcant performance hit. If you need to use the operation over
106+
several datasets, use a list comprehension.
107+
108+
::
109+
110+
frames = [ process_your_file(f) for f in files ]
111+
result = pd.concat(frames)
112+
113+
103114
Set logic on the other axes
104115
~~~~~~~~~~~~~~~~~~~~~~~~~~~
105116

0 commit comments

Comments
 (0)