I\'m trying to remove a group of columns from a dataset. All of the variables to remove end with the text \"prefix\".
I did manage to \"collect\' them into a group
df2 = df.loc[:, ~df.columns.str.endswith('prefix')]