title: KeyError: "None of [Index([...] are in the [columns]
body: <p>I've got numpy array with shape of (3, 50):</p>
  <pre><code>data = np.array([[0, 3, 0, 2, 0, 0, 1, 2, 2, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 2, 0, 0,
          0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 7, 0, 0, 0, 0,
          1, 1, 2, 0, 0, 2],
         [0, 0, 0, 0, 0, 3, 0, 1, 6, 1, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0,
          3, 0, 0, 0, 0, 0, 0, 5, 2, 2, 2, 1, 0, 0, 1, 0, 1, 3, 2, 0, 0, 0,
          0, 0, 2, 0, 0, 0],
         [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
          0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0,
          0, 0, 0, 0, 0, 0]])
  </code></pre>
  <p>and the following column names:</p>
  <pre><code>new_cols = [f'description_word_{i+1}_count' for i in range(50)]
  </code></pre>
  <p>I'm trying to add new columns in already existing dataframe in such way:</p>
  <pre><code>df[new_cols] = data
  </code></pre>
  <p>but get the error:</p>
  <blockquote>
  <p>KeyError: &quot;None of [Index(['description_word_1_count',
  'description_word_2_count',\n       'description_word_3_count',
  'description_word_4_count',\n       'description_word_5_count',
  'description_word_6_count',\n       'description_word_7_count',
  'description_word_8_count',\n       'description_word_9_count',
  'description_word_10_count',\n       'description_word_11_count',
  'description_word_12_count',\n       'description_word_13_count',
  'description_word_14_count',\n       'description_word_15_count',
  'description_word_16_count',\n       'description_word_17_count',
  'description_word_18_count',\n       'description_word_19_count',
  'description_word_20_count',\n       'description_word_21_count',
  'description_word_22_count',\n       'description_word_23_count',
  'description_word_24_count',\n       'description_word_25_count',
  'description_word_26_count',\n       'description_word_27_count',
  'description_word_28_count',\n       'description_word_29_count',
  'description_word_30_count',\n       'description_word_31_count',
  'description_word_32_count',\n       'description_word_33_count',
  'description_word_34_count',\n       'description_word_35_count',
  'description_word_36_count',\n       'description_word_37_count',
  'description_word_38_count',\n       'description_word_39_count',
  'description_word_40_count',\n       'description_word_41_count',
  'description_word_42_count',\n       'description_word_43_count',
  'description_word_44_count',\n       'description_word_45_count',
  'description_word_46_count',\n       'description_word_47_count',
  'description_word_48_count',\n       'description_word_49_count',
  'description_word_50_count'],\n      dtype='object')] are in the
  [columns]&quot;</p>
  </blockquote>
  <p>Also I don't know where it finds a '\n' symbols in my column names.</p>
  <p>At the same time creating a new dataframe with the data is OK:</p>
  <pre><code>new_df = pd.DataFrame(data=data, columns=new_cols)
  </code></pre>
  <p>Does anyone know what is causing the error?</p>