pandas shuffle dataframe First Published: Jan 6, 2022 In Pandas you can shuffle your DataFrame like below with sample. df = df.sample(frac=1)