File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ def concat(
173
173
they are all None in which case a ValueError will be raised.
174
174
axis : {0/'index', 1/'columns'}, default 0
175
175
The axis to concatenate along.
176
+ If 0, the outcome is identical to :meth:`DataFrame.append`.
176
177
join : {'inner', 'outer'}, default 'outer'
177
178
How to handle indexes on other axis (or axes).
178
179
ignore_index : bool, default False
@@ -344,6 +345,22 @@ def concat(
344
345
Traceback (most recent call last):
345
346
...
346
347
ValueError: Indexes have overlapping values: ['a']
348
+
349
+ Append a single row to the end of a ``DataFrame`` object.
350
+
351
+ >>> a = pd.DataFrame({"A": 1, "B": 2}, index=[0])
352
+ >>> a
353
+ A B
354
+ 0 1 2
355
+ >>> b = pd.DataFrame({"A": 3}, index=[0])
356
+ >>> b
357
+ A
358
+ 0 3
359
+ >>> for rowIndex, row in b.iterrows():
360
+ >>> print(pd.concat([a, row.to_frame().T], ignore_index=True))
361
+ A B
362
+ 0 1 2.0
363
+ 1 3 NaN
347
364
"""
348
365
op = _Concatenator (
349
366
objs ,
You can’t perform that action at this time.
0 commit comments