Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: DataFrame.to_html() to create hyperlinks #2679

Closed
michaelaye opened this issue Jan 10, 2013 · 5 comments · Fixed by #23715
Closed

Improvement: DataFrame.to_html() to create hyperlinks #2679

michaelaye opened this issue Jan 10, 2013 · 5 comments · Fixed by #23715
Labels
Enhancement good first issue IO HTML read_html, to_html, Styler.apply, Styler.applymap
Milestone

Comments

@michaelaye
Copy link
Contributor

When the data value is a string that represents an URL, have DataFrame.to_html() create hyperlinks out of them in the resulting html file.

@hunterowens
Copy link
Contributor

Hi all-

I'm trying to implement this, as it could be useful. Anyways, it looks like all that would need to be done is add a check if is valid url in write_tr (core/format.py) and if so, add the appropriate <a> tag. However, I was wondering if there is a is_valid_url type function elsewhere that I could import to use as a check?

@jreback
Copy link
Contributor

jreback commented Oct 6, 2014

https://github.com/pydata/pandas/blob/master/pandas/io/common.py#L49

but may want to filter out url-like first (e.g. .startswith('http') or something first

@tdas14
Copy link

tdas14 commented Apr 13, 2015

Working on this one!

tdas14 pushed a commit to tdas14/pandas that referenced this issue Apr 13, 2015
lexual pushed a commit to lexual/pandas that referenced this issue Jun 6, 2015
New urls_as_links boolean paramater that will output urls as href html
links. ref pandas-dev#2679
@jdejoode
Copy link

Any new on this issue? Has this been implemented?

@jreback jreback modified the milestones: Next Major Release, Someday Nov 2, 2015
lexual added a commit to lexual/pandas that referenced this issue Nov 12, 2015
New urls_as_links boolean paramater that will output urls as href html
links. ref pandas-dev#2679
@xuyannus
Copy link

xuyannus commented Nov 7, 2017

Any new on this issue? Has this been implemented?

@datapythonista datapythonista modified the milestones: Contributions Welcome, Someday Jul 8, 2018
@gfyoung gfyoung added IO HTML read_html, to_html, Styler.apply, Styler.applymap and removed Community labels Nov 15, 2018
@jreback jreback modified the milestones: Someday, 0.24.0 Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement good first issue IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
10 participants