- The method append(), concatenates one Series with another Series to produce a new Series.
- The way two pandas series are attached using append() is a straight concatenation - one after another.
- If elements from two series have to be combined using a specific semantics, like the elements need to be compared and added into the new Series object the method combine() can be used.
# Example Python program to append two pandas Series objects
# to get a new Series
import pandas as pds
# Create lists of odd numbers
sequence1 = [81, 83, 85, 87, 89];
sequence2 = [91, 93, 95, 97, 99];
# Create pandas series instances
series1 = pds.Series(sequence1);
series2 = pds.Series(sequence2);
# Append two series to get new series
newSeries = series1.append(series2);
print("New series obtained by appending two series instances:");
New series obtained by appending two series instances: