2

I am trying to insert a new row in between data frame (6th row precisely) and I am unable to without overriding the existing row. Can you please help me correct this?

out2.loc[6] = ['EMPTY LINE']
out2.index = out2.index + 1
out2 = out2.sort_index()
print(out2)
timewaste
  • 43
  • 6
  • 1
    Possible duplicate of [Inserting new rows in pandas data frame at specific indices](https://stackoverflow.com/questions/44599589/inserting-new-rows-in-pandas-data-frame-at-specific-indices) – Zito Relova Oct 30 '18 at 23:05

0 Answers0