pyspark.pandas.DataFrame.append

DataFrame.append(other: pyspark.pandas.frame.DataFrame, ignore_index: bool = False, verify_integrity: bool = False, sort: bool = False) → pyspark.pandas.frame.DataFrame[source]

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
otherDataFrame or Series/dict-like object, or list of these

The data to append.

ignore_indexboolean, default False

If True, do not use the index labels.

verify_integrityboolean, default False

If True, raise ValueError on creating index with duplicates.

sortboolean, default False

Currently not supported.

Returns
appendedDataFrame

Examples

>>> df = ps.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
>>> df.append(df)
   A  B
0  1  2
1  3  4
0  1  2
1  3  4
>>> df.append(df, ignore_index=True)
   A  B
0  1  2
1  3  4
2  1  2
3  3  4