Sort Function In Numpy Array Append Rows To A Dataframe