import pandas
import random
df = pandas.DataFrame(np.random.randn(100, 4), columns=list('ABCD'))
rows = random.sample(df.index, 10)
df_10 = df.ix[rows]
df_90 = df.drop(rows)
Pandas: Sampling a DataFrame