title: Create new column based on matching values from another dataframe
body: <p>I have looked through the other answers for Operand errors and none of them seem to fit this example !</p>
  <p>I'm trying to create new pandas column based on condition from another dataframe.The two dataframes haven't the same shape (194802 rows against 9 rows).</p>
  <p>I have tried this code so far:</p>
  <pre><code>for index in range(len(df_segment)):
  df_segment['cible'] = np.where((df_filtre_client[&quot;montant_com&quot;]&gt;df_segment.iloc[index]['ca']) &amp; \
                                  (df_filtre_client[&quot;nb_months&quot;]&gt;df_segment.iloc[index]['nb_mois_strct_sup']) &amp; \
                                  (df_filtre_client[&quot;nb_months&quot;]&lt;=df_segment.iloc[index]['nb_mois_max']) &amp; \
                                  (df_filtre_client[&quot;nb_cmd&quot;]&gt;df_segment.iloc[index]['nb_cmd_strct_sup']) &amp; \
                                  (df_filtre_client[&quot;nb_cmd&quot;]&lt;=df_segment.iloc[index]['nb_cmd_max']) , 1 , df_segment['cible']) 
  </code></pre>
  <p>But I get this error :</p>
  <pre><code>ValueError: operands could not be broadcast together with shapes (194802,) () (9,)
  </code></pre>
  <p>How can I rid of it ?</p>
  <p>Thanks in advance !</p>