title: arrays used as indices must be of integer (or boolean) type and it doesn accept Zip package
body: <p>I am trying to do mail merge using docx and excel in python and I am struggling with my code :</p>
  <pre><code>import pandas as pd
  import os
  import sys
  from docxtpl import DocxTemplate
  
  fname2=r&quot;Agent Letter.docx&quot;
  df=pd.read_excel(r&quot;Agents 2 Address Line.xlsx&quot;)
  </code></pre>
  <p>it reads all these files</p>
  <pre><code>zip_code=df[&quot;zip&quot;].values
  agent_state=df[&quot;agent_state&quot;].values
  pw=df[&quot;pw&quot;].values
  agent_address_1=df[&quot;agent_address_1&quot;].values
  primary_owner=df[&quot;primary_owner&quot;].values
  agent_city=df[&quot;agent_city&quot;].values
  wr_id=df[&quot;wr_id&quot;].values
  agent_name=df[&quot;agent_name&quot;].values
  agent_address_2=df[&quot;agent_address_2&quot;].values
  
  
  final=zip[zip_code,agent_state,pw,agent_address_1,primary_owner,agent_city,wr_id,agent_name,agent_address_2]
  </code></pre>
  <p>when running the above code I get this error:</p>
  <pre><code>IndexError                                Traceback (most recent call last)
  &lt;ipython-input-22-37982563d551&gt; in &lt;module&gt;
  ----&gt; 1 final=zip[zip_code,agent_state,pw,agent_address_1,primary_owner,agent_city,wr_id,agent_name,agent_address_2]
  IndexError: arrays used as indices must be of integer (or boolean) type
  </code></pre>
  <pre><code>for a,b,c,d,e,f,g,h,i in final:
  
  
      doc=DocxTemplate(fname2)
  
      context={&quot;zip_code&quot;:a,&quot;agent_state&quot;:b,&quot;pw&quot;:c,&quot;agent_address_1&quot;:d,&quot;primary_owner&quot;:e,
               &quot;agent_city&quot;:f,&quot;wr_id&quot;:g,&quot;agent_name&quot;:h,&quot;agent_address_2&quot;:i}
      
        doc.render(context)
        doc.save('{}.docx'.format(b))
      
  print(&quot;All Files done&quot;)
  </code></pre>
  <p>Thank you
  Any help will be appreciated.</p>