Guest User

Untitled

a guest
Jul 9th, 2019
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. import numpy as np
  2. import pandas as pd
  3. from IPython.display import HTML
  4. a = pd.DataFrame({'address_lines':['31 Stuart Road Highcliffe', '33 WEST STREET', '66 PINE ROAD', '37 PRIESTLEY ROAD', '9 MAYFORD ROAD'], 'city':['CHRISTCHURCH', 'RINGWOOD', 'BOURNEMOUTH', 'BOURNEMOUTH', 'POOLE']})
  5. def make_clickable(val):
  6.     return '<a href="{}">{}</a>'.format('www.google.com/maps/place/' + val, val)
  7. a.style.format({'address_lines':make_clickable})
  8. # This is not giving the required data as hyperlinks
  9. a.to_excel('test.xlsx')
Add Comment
Please, Sign In to add comment