Subsample pandas dataframe <p>I have a DataFrame loaded from a tsv file. I wanted to generate some exploratory plots. The problem is that the data set is large (~1 million rows), so it there are too many points on the plot to see a trend. Plus, it is taking a while to plot.</p> <p>I wanted to sub-sample 10000 randomly distributed rows. Also, this should be reproducible, so the same sequence of random numbers is generated in each run.</p> <p>Thanks for help.</p> <p>This: <a href="http://stackoverflow.com/questions/17260109/sample-two-pandas-dataframes-the-same-way/17260475#17260475">Sample two pandas dataframes the same way</a> seems to be on the right track, but I cannot guarantee the subsample size. </p>