diff --git a/pandas/core/series.py b/pandas/core/series.py index f3e059b3d6e98..5a468f419f4ab 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1481,6 +1481,36 @@ def append(self, to_append, verify_integrity=False): Returns ------- appended : Series + + Examples + -------- + >>> 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 + + >>> s1.append(s3) + 0 1 + 1 2 + 2 3 + 3 4 + 4 5 + 5 6 + dtype: int64 + + With `verify_integrity` set to True: + + >>> s1.append(s2, verify_integrity=True) + ValueError: Indexes have overlapping values: [0, 1, 2] + + """ from pandas.tools.merge import concat