Q:

Append row to the end of a dataframe with loc function

I have a dataframe that is a result of some multiple step processing. I am adding one row to this dataframe like so: 
df.loc[‘newindex’] = 0

Where ‘newindex’ is unique to the dataframe. I expect the new row to show up as a last row in the dataframe. But the row shows up somewhere near the middle of the dataframe.
What could be the reason of such behavior? I have to add row exactly at the last position, with its index name preserved.
* update *
I was wrong about uniqueness of the df index. The value has already been there.

A:

I think value newindex is already in index, so loc select and overwite row instead append:
df = pd.DataFrame({'a':range(5)}, index=['a','s','newindex','d','f'])
print (df)
          a
a         0
s         1
newindex  2
d         3
f         4

df.loc['newindex'] = 0
df.loc['newindex1'] = 0
print (df)
           a
a          0
s          1
newindex   0
d          3
f          4
newindex1  0

