-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
ENH: Issue #2679. DataFrame.to_html() to create hyperlinks for valid URL... #9880
Conversation
…for valid URL strings
how does this handle the automatic HTML pretty-printing of dataframes in the ipython notebook? is the presentation of URLs affected? |
Aa far as I know it shouldn't. All it does is check for a valid url string and then put the value in an |
For what it's worth, I don't think it would be a bad thing for the notebook output to include URLs as links, but it would definitely be annoying if they are pretty-printed as a HTML code inside the table :). |
this should to be optional at the very least if not off by default for backward compatibility. |
@tdas14 this needs to be an option when printing (e.g. passed to |
@@ -716,6 +716,35 @@ def test_to_html_multiindex_sparsify_false_multi_sparse(self): | |||
</table>""" | |||
self.assertEqual(result, expected) | |||
|
|||
|
|||
def test_to_html_with_hyperlinks(self): | |||
df = DataFrame([[0,'http://pandas.pydata.org/', 'pydata.org']],columns=['foo', 'bar', None], index=lrange(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the issue number here as a comment
@tdas14 this needs to be an option directly to |
closing, but if you would like to continue working on this pls reopen |
Closes #2679