Python Codes
6.29K subscribers
51 photos
1 file
86 links
This channel will serve you all the codes and programs which are related to Python.

We post the codes from the beginner level to advanced level.
Download Telegram
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