DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
3+5 =
Submit