Create: Update:
To shuffle pandas DataFrame df (
in a reproducible way):
df = df.sample(frac=1, random_state=123).reset_index(drop=True)
Alternatively, you can use sklearn.utils.shuffle().
#pandas
@Python_Codes
>>Click here to continue<<
Python Codes