Pandas merge doesn't preserve sorting order
<p>I am trying the following:</p>

<pre><code>PoliceStations_raw=pd.DataFrame(
[['BAYVIEW'   ,37.729732,-122.397981],
 ['CENTRAL'   ,37.798732,-122.409919],
 ['INGLESIDE' ,37.724676,-122.446215],
 ['MISSION'   ,37.762849,-122.422005],
 ['NORTHERN'  ,37.780186,-122.432467],
 ['PARK'      ,37.767797,-122.455287],
 ['RICHMOND'  ,37.779928,-122.464467],
 ['SOUTHERN'  ,37.772380,-122.389412],
 ['TARAVAL'   ,37.743733,-122.481500],
 ['TENDERLOIN',37.783674,-122.412899]],columns=['PdDistrict','XX','YY'])


df1=pd.DataFrame([[0,'CENTRAL'],[1,'TARAVAL'],[3,'CENTRAL'],[2,'BAYVIEW']])
df1.columns = ['Index','PdDistrict']


  Index PdDistrict
0   0   CENTRAL
1   1   TARAVAL
2   3   CENTRAL
3   2   BAYVIEW
</code></pre>

<p>despite having typed in <code>sort=False</code>, the returned object has merged the table but is using <code>PdDistrict</code> as some Index and has changed the order of the rows of the original left dataframe.</p>

<pre><code>pd.merge(df1,PoliceStations_raw,sort=False)
</code></pre>

<p>returns this (note that the order of <code>PdDistrict</code> has changed)</p>

<pre><code>  Index PdDistrict  XX        YY
0   0   CENTRAL 37.798732   -122.409919
1   3   CENTRAL 37.798732   -122.409919
2   1   TARAVAL 37.743733   -122.481500
3   2   BAYVIEW 37.729732   -122.397981
</code></pre>