title: Extarcting only the city and pincode from the address given in pandas column python
body: <p>How to extract only the pin-code and city from the address given and in particular column and assign it into two new pandas columns named as 'city' and 'address'. This is working fine with the regex in python pandas , is there any other quick way to run since it takes more than 6 min for 10000 rows.</p>
  
  <p>Example address:<code>87 F/F  Place Opp. C-2, Uttam Nagar  NA  Delhi 110059 Delhi</code></p>
  
  <pre><code>pincoderegex=re.compile(r'([\w]*)[\s]([\d]{6})')
  pincoderegex.search(ref).group()  --- &gt; o/p : 'Delhi 110059'
  pincoderegex.search(data_rnr['BORROWER ADDRESS'][80]).groups()[1] ---&gt; o/p:'700105'
  data_rnr['BORROWER CITY_NAME']='default value'
  data_rnr['BORROWER CITY_PINCODE']='default value'
  for i in range(0,len(data_rnr['BORROWER ADDRESS'])):
      try:
          data_rnr['BORROWER CITY_NAME'][i]=pincoderegex.search(data_rnr['BORROWER ADDRESS'][i]).groups()[0]
          data_rnr['BORROWER CITY_PINCODE'][i]=pincoderegex.search(data_rnr['BORROWER ADDRESS'][i]).groups()[1]
      except TypeError:
          print('TypeError')
      except NameError:
          print('NameError')
      except AttributeError:
          print('AttributeError')
      except:
          pass
  </code></pre>
  
  <p>The output will be added in the new Df columns <code>data_rnr['BORROWER CITY_NAME']</code> and <code>data_rnr['BORROWER CITY_PINCODE']</code></p>