I have a DF like
A B C D E F G H I
=====================================
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
I need to set all the values for columns except for A and C to be Null
A B C D E F G H I
=====================================
1 3
1 3
1 3
If there a way to do this instead of using the below code like using a not condition to check for only columns A & C and set null to every other columns
df[['B','D','E','F','G','H','I']] = ''