10/28/2018

python pandas, shuffle

refer to example code:



from sklearn.utils import shuffle
import pandas as pd

df = pd.read_csv('test.csv')
df = shuffle(df) #suffle
df.reset_index(drop=True) #index reset
df.to_csv('rfine_table_shuffle.csv', index=False)