How mix rows around in a Pandas DataFrame?
You can use .sample(n) on your pandas dataframe to view a random sample of n items if that is all you need...
I have a dataset that contains many binary columns. In the first half, each row has at least a 1; on the second half, each row has all zeros across all columns.
Is there a function to randomize rows so that they are not grouped by rows that have at least one 1 and rows that have all zeros?
Thank you!