title: print top 3 Pandas DataFrame rows to JSON
body: <p>I would like to print (or return) just 3 top rows of a pandas DataFrame. Doing the following gets me all of them: </p>
  
  <pre><code>df1 = pd.DataFrame(np.random.randn(10,2),columns=list('AB'))
  df2 = df1.sort(["B"], ascending=[True]) 
  
  df2.to_json(orient="records")  # prints all the rows
  </code></pre>
  
  <p>How do I limit JUST the top 3 rows and print them to JSON? </p>
  
  <p>Thanks! </p>