I have a pandas data frame that looks something like this:
A B C
0 1 2 3
1 4 5 6
2 7 8 9
And I would like to add row 0 to the end of the data frame and to get a new data frame that looks like this:
A B C
0 1 2 3
1 4 5 6
2 7 8 9
3 1 2 3
What can I do in pandas to do this?
You can try:
df = df.append(df.iloc[0], ignore_index=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With