I have come across some previous posts regarding how to shuffle row values (Randomizing/Shuffling rows in a dataframe in pandas). For me though, I was wondering how to shuffle a portion of those rows, rather than the entirety of these rows.
I made a quick dataframe here:
df = pd.DataFrame(np.random.randn(10, 5), columns=list('ABCDE'))
Is there a way to re-work this such that for each row, the values in columns B,C,and D are shuffled while the values in columns A and E remain in the same location?