You can use the concat
function:
In [13]: pd.concat([x]*5)
Out[13]:
a b
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
If you only want to repeat the values and not the index, you can do:
In [14]: pd.concat([x]*5, ignore_index=True)
Out[14]:
a b
0 1 2
1 1 2
2 1 2
3 1 2
4 1 2
More Related Contents:
- Remove pandas rows with duplicate indices
- Repeat rows in a pandas DataFrame based on column value
- Remove duplicates from dataframe, based on two columns A,B, keeping row with max value in another column C
- Group duplicate column IDs in pandas dataframe
- Remove duplicate rows from Pandas dataframe where only some columns have the same value
- How can I replicate rows in Pandas?
- How can I replicate rows of a Pandas DataFrame?
- How to “select distinct” across multiple data frame columns in pandas?
- How to drop rows of Pandas DataFrame whose value in a certain column is NaN
- How to make separator in pandas read_csv more flexible wrt whitespace, for irregular separators?
- Convert the string 2.90K to 2900 or 5.2M to 5200000 in pandas dataframe
- Conditionally fill column values based on another columns value in pandas
- Drop rows containing empty cells from a pandas DataFrame
- Normalize columns of a dataframe
- Pandas selecting by label sometimes return Series, sometimes returns DataFrame
- How to switch columns rows in a pandas dataframe
- Quickest way to make a get_dummies type dataframe from a column with a multiple of strings
- Pandas groupby.size vs series.value_counts vs collections.Counter with multiple series
- “unstack” a pandas column containing lists into multiple rows [duplicate]
- How to check whether a pandas DataFrame is empty?
- Copy pandas dataframe to excel using openpyxl
- How to drop unique rows in a pandas dataframe?
- pandas – find first occurrence
- How to convert a dataframe to a dictionary
- Read CSV into a dataFrame with varying row lengths using Pandas
- Filling missing values using forward and backward fill in pandas dataframe (ffill and bfill)
- Truncate `TimeStamp` column to hour precision in pandas `DataFrame`
- In Python pandas, start row index from 1 instead of zero without creating additional column
- Python: Adding hours to pandas timestamp
- Pandas: Join dataframe with condition