pyspark.pandas.Series.append

Series.append(to_append: pyspark.pandas.series.Series, ignore_index: bool = False, verify_integrity: bool = False) → pyspark.pandas.series.Series

Concatenate two or more Series.

Parameters
to_appendSeries or list/tuple of Series
ignore_indexboolean, default False

If True, do not use the index labels.

verify_integrityboolean, default False

If True, raise Exception on creating index with duplicates

Returns
appendedSeries

Examples

>>> s1 = ps.Series([1, 2, 3])
>>> s2 = ps.Series([4, 5, 6])
>>> s3 = ps.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
>>> s1.append(s3)
0    1
1    2
2    3
3    4
4    5
5    6
dtype: int64

With ignore_index set to True:

>>> s1.append(s2, ignore_index=True)
0    1
1    2
2    3
3    4
4    5
5    6
dtype: int64