Created
November 9, 2021 02:57
-
-
Save ivanvoid/cb02fd2982932b1fbc90a9ed0652e066 to your computer and use it in GitHub Desktop.
dataframe shuffler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shuffle(data): | |
data = data.iloc[np.random.permutation(len(data))] | |
data = data.reset_index(drop=True) | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment