def append(self, other, ignore_index=False,<EOL>verify_integrity=False, sort=None):
if isinstance(other, (Series, dict)):<EOL><INDENT>if isinstance(other, dict):<EOL><INDENT>other = Series(other)<EOL><DEDENT>if other.name is None and not ignore_index:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if other.name is None:<EOL><INDENT>index = None<EOL><DEDENT>else:<EOL><INDENT>index = Index([other.name], name=self.index.name)<EOL><DEDENT>idx_diff = other.index.difference(self.columns)<EOL>try:<EOL><INDENT>combined_columns = self.columns.append(idx_diff)<EOL><DEDENT>except TypeError:<EOL><INDENT>combined_columns = self.columns.astype(object).append(idx_diff)<EOL><DEDENT>other = other.reindex(combined_columns, copy=False)<EOL>other = DataFrame(other.values.reshape((<NUM_LIT:1>, len(other))),<EOL>index=index,<EOL>columns=combined_columns)<EOL>other = other._convert(datetime=True, timedelta=True)<EOL>if not self.columns.equals(combined_columns):<EOL><INDENT>self = self.reindex(columns=combined_columns)<EOL><DEDENT><DEDENT>elif isinstance(other, list) and not isinstance(other[<NUM_LIT:0>], DataFrame):<EOL><INDENT>other = DataFrame(other)<EOL>if (self.columns.get_indexer(other.columns) >= <NUM_LIT:0>).all():<EOL><INDENT>other = other.reindex(columns=self.columns)<EOL><DEDENT><DEDENT>from pandas.core.reshape.concat import concat<EOL>if isinstance(other, (list, tuple)):<EOL><INDENT>to_concat = [self] + other<EOL><DEDENT>else:<EOL><INDENT>to_concat = [self, other]<EOL><DEDENT>return concat(to_concat, ignore_index=ignore_index,<EOL>verify_integrity=verify_integrity,<EOL>sort=sort)<EOL>
Append rows of `other` to the end of caller, returning a new object.

Columns in `other` that are not in the caller are added as new columns.

Parameters
----------
other : DataFrame or Series/dict-like object, or list of these
    The data to append.
ignore_index : boolean, default False
    If True, do not use the index labels.
verify_integrity : boolean, default False
    If True, raise ValueError on creating index with duplicates.
sort : boolean, default None
    Sort columns if the columns of `self` and `other` are not aligned.
    The default sorting is deprecated and will change to not-sorting
    in a future version of pandas. Explicitly pass ``sort=True`` to
    silence the warning and sort. Explicitly pass ``sort=False`` to
    silence the warning and not sort.

    .. versionadded:: 0.23.0

Returns
-------
DataFrame

See Also
--------
concat : General function to concatenate DataFrame, Series
    or Panel objects.

Notes
-----
If a list of dict/series is passed and the keys are all contained in
the DataFrame's index, the order of the columns in the resulting
DataFrame will be unchanged.

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

Examples
--------

>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
>>> df
   A  B
0  1  2
1  3  4
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=list('AB'))
>>> df.append(df2)
   A  B
0  1  2
1  3  4
0  5  6
1  7  8

With `ignore_index` set to True:

>>> df.append(df2, ignore_index=True)
   A  B
0  1  2
1  3  4
2  5  6
3  7  8

The following, while not recommended methods for generating DataFrames,
show two ways to generate a DataFrame from multiple data sources.

Less efficient:

>>> df = pd.DataFrame(columns=['A'])
>>> for i in range(5):
...     df = df.append({'A': i}, ignore_index=True)
>>> df
   A
0  0
1  1
2  2
3  3
4  4

More efficient:

>>> pd.concat([pd.DataFrame([i], columns=['A']) for i in range(5)],
...           ignore_index=True)
   A
0  0
1  1
2  2
3  3
4  4