Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to repeat a row in pandas

newdf = pd.DataFrame(np.repeat(df.values, 3, axis=0))
newdf.columns = df.columns
print(newdf)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #repeat #row #pandas
ADD COMMENT
Topic
Name
3+5 =