pandas 1.4.2

NotesParametersReturnsBackRef
append(self, to_append, ignore_index: 'bool' = False, verify_integrity: 'bool' = False)
deprecated

Use :None:func:`concat` instead. For further details see :None:ref:`whatsnew_140.deprecations.frame_series_append`

Notes

Iteratively appending to a Series can be more computationally intensive than a single concatenate. A better solution is to append values to a list and then concatenate the list with the original Series all at once.

Parameters

to_append : Series or list/tuple of Series

Series to append with self.

ignore_index : bool, default False

If True, the resulting axis will be labeled 0, 1, …, n - 1.

verify_integrity : bool, default False

If True, raise Exception on creating index with duplicates.

Returns

Series

Concatenated Series.

Concatenate two or more Series.

See Also

concat

General function to concatenate DataFrame or Series objects.

Examples

This example is valid syntax, but we were not able to check execution
>>> s1 = pd.Series([1, 2, 3])
... s2 = pd.Series([4, 5, 6])
... s3 = pd.Series([4, 5, 6], index=[3, 4, 5])
... s1.append(s2) 0 1 1 2 2 3 0 4 1 5 2 6 dtype: int64
This example is valid syntax, but we were not able to check execution
>>> s1.append(s3)
0    1
1    2
2    3
3    4
4    5
5    6
dtype: int64

With :None:None:`ignore_index` set to True:

This example is valid syntax, but we were not able to check execution
>>> s1.append(s2, ignore_index=True)
0    1
1    2
2    3
3    4
4    5
5    6
dtype: int64

With :None:None:`verify_integrity` set to True:

This example is valid syntax, but we were not able to check execution
>>> s1.append(s2, verify_integrity=True)
Traceback (most recent call last):
...
ValueError: Indexes have overlapping values: [0, 1, 2]
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

pandas.core.reshape.concat.concat

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/series.py#2850
type: <class 'function'>
Commit: