SyntaxFix
Write A Post
Hire A Developer
Questions
This might be more useful when you want your index shuffled.
def shuffle(df): index = list(df.index) random.shuffle(index) df = df.ix[index] df.reset_index() return df
It selects new df using new index, then reset them.