Q:

Why registerTempTable removes some rows from the data-frame?

I try to create a pandas data-frame using a Spark data-frame on HDInsight in the following way:
tmp = sqlContext.createDataFrame(sparkDf)
tmp.registerTempTable('temp') 

It looks like the registerTempTable removes some rows from the data-frame. 
The following command returns 11000
sparkDf.count()

While tmp has only 2500 rows.
I am following steps described here.

A:

I am assuming you're using Jupyter notebooks, and that you're getting your data from a SQL query, i.e.
%%sql -o tmp
SELECT * FROM temp

This is happening because the %%sql query transparently limits the size of the result dataframe tmp to 2500 rows.  You can choose a new limit by using the -n option:
%%sql -o tmp -n 11000
SELECT * FROM temp

You can also choose -1 to say that you don't want to limit the size of the dataframe at all (be careful with this, because if the result set is big enough it can cause your driver to run out of memory or your browser to hang/crash when rendering charts):
%%sql -o tmp -n -1 
SELECT * FROM temp

