w3resource

Pandas Series: append() function

Concatenate two or more Pandas series

The append() function is used to concatenate two or more Series.

Syntax:

Series.append(self, to_append, ignore_index=False, verify_integrity=False)
Pandas Series append image
Name Description Type/Default Value Required / Optional
to_append   Series to append with self. Series or list/tuple of Series Required
ignore_index If True, do not use the index labels. bool
Default Value: False
Required
verify_integrity If True, raise Exception on creating index with duplicates. bool
Default Value: False
Required

Returns: Series - Concatenated Series.

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.

Example:


Download the above Notebook from here.



Inviting useful, relevant, well-written and unique guest posts