title: python - get zipcode from full address
body: <p>I have a dataframe with full addresses in a column, and I need to create a separate column with just the zip code. Some of the addresses just have the five digit zip code whereas others have the additional four digits. </p>
  
  <p>How do I split the column to just get the zip code? </p>
  
  <p>Example Data</p>
  
  <pre><code>d = {'name':['bob','john'],'address':['123 6th Street,Sterling VA 20165-7513','567 7th Street, Wilmington NC 28411']}
  df = pd.DataFrame(d)
  </code></pre>
  
  <p>I tried using rpartition but I get everything before the zip code:</p>
  
  <pre><code>df['test'] = df['address'].str.rpartition(" ")
  print(df)
  name    address                                test
  bob     123 6th Street,Sterling VA 20165-7513  123 6th Street,Sterling VA
  john    567 7th Street, Wilmington NC 28411    567 7th Street, Wilmington NC
  </code></pre>
  
  <p>This is what I'm trying to get:</p>
  
  <pre><code>name    address                                zipcode
  bob     123 6th Street,Sterling VA 20165-7513  20165-7513
  john    567 7th Street, Wilmington NC 28411    28411
  </code></pre>