duplicate
Returns a FrameColumn that holds this DataFrame n times.
Each of the n cells of the column is this DataFrame. The column has an empty name.
For more information: See duplicate on a DataFrame on the documentation website.
See also:
duplicateRows— repeats every row of thisDataFramentimes.concat— joins the copies into oneDataFrame:df.duplicate(2).concat()has all rows ofdf, followed by all rows ofdfagain.
Example
In the example, df has the columns name and age and three rows: Alice, 15, Bob, 20 and Charlie, 30.
// A column with 3 cells, each cell holds `df`
df.duplicate(3)Return
A FrameColumn with an empty name and n cells, each holding this DataFrame.
Parameters
The number of copies in the result, the original included. Must be greater than 0.
Throws
if n is 0 or negative.
Returns a DataFrame with n rows, each of them a copy of this DataRow.
The result has the same columns as the DataFrame this row comes from, column groups and frame columns included. The type of each column follows the value in this row: a nullable column whose value in this row is not null becomes non-nullable in the result.
For more information: See duplicate on a DataRow on the documentation website.
See also:
duplicateRows— repeats rows inside aDataFrame.duplicate— puts copies of a wholeDataFrameinto aFrameColumn.
Example
In the example, df has the columns name and age and three rows: Alice, 15, Bob, 20 and Charlie, 30.
// Bob, Bob, Bob
df[1].duplicate(3)Return
Parameters
The number of copies in the result, the original included. Must be greater than 0.
Throws
if n is 0 or negative.