I have two dataframes:

The first dataframe is simply one column where each row is a column name in the 2nd dataframe. This dataframe only contains a subset of all the columns. 

What I want to do is remove the columns in the 2nd dataframe that are referenced in the smaller one. I've written a loop that does that, but I was wondering if there was a more efficient way to do so, as I need to remove about 5,000 columns.

Here's my code that accomplishes this task:

```
for i in to_remove['column_name']:
    df = df.drop(i, axis=1)

```

Thanks!