Get random sample from dataframe python. import pandas as pd df = pd.