title: Pandas KeyError: "None of [Index([(...], dtype='object')] are in the [columns]"
body: <p>I used made a list with columns using this:</p>
  <pre><code>allColumns = df1.columns.to_list() #get all columns
  columns2020 = [column for column in allColumns if column[-2:] == '20'] #extract 2020 columns
  </code></pre>
  <p>If I print it, everything is fine, buy if I try slicing the dataframe with these values, the whole thing just stops working.</p>
  <pre><code>df2[&quot;confirmed_2020&quot;] = df1[[columns2020]]
  </code></pre>
  <p>I also tried using .loc, but the error remains the same.</p>