Answers for "shuffle pandas column"

8

shuffle dataframe python

df = df.sample(frac=1).reset_index(drop=True)
Posted by: Guest on November-26-2019
1

shuffle columns pandas

#Reshuffle the column names of the dataframe called 'data'
data = data[['Year','Sales',
 'COGS',
 'Operating Exp',
 'Other Income',
 'Financing Charges',
 'Zakat',
 'Income Tax',
 'Net Income',
 'CFO',
 'CFI',
 'Free Cash Flow',
 'Shareholder Equity',
 'Dividends',
 'EPS']]
Posted by: Guest on August-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language