human
How to select only specific columns from a DataFrame with MultiIndex columns?
assistant
Here is some code to select only specific columns 'a' and 'c' from a dataframe 'data' with multiindex columns

data.loc[:, ([('one', 'a'), ('one', 'c'), ('two', 'a'), ('two', 'c')])]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.