I had a case similar to the question above, but to solve I did this:
columns = ["a", "b", "c"] df[[*columns]]
This unpacks the column names and uses them to generate a new dataframe with only the column names in the columns list
columns