diff --git a/swat/dataframe.py b/swat/dataframe.py old mode 100644 new mode 100755 index af1be861..3f535caa --- a/swat/dataframe.py +++ b/swat/dataframe.py @@ -788,10 +788,7 @@ def to_html(self, apply_formats=None, **kwargs): def _post_process_html(self, html): ''' Add SAS-isms to generated HTML table ''' - try: - from html import escape - except ImportError: - from cgi import escape + from html import escape # Add table label if self.label: diff --git a/swat/notebook/zeppelin.py b/swat/notebook/zeppelin.py old mode 100644 new mode 100755 index 33505a11..8c74239f --- a/swat/notebook/zeppelin.py +++ b/swat/notebook/zeppelin.py @@ -24,7 +24,7 @@ from __future__ import print_function, division, absolute_import, unicode_literals import base64 -import cgi +import html import pandas as pd import pprint import six @@ -77,7 +77,7 @@ def show(obj, **kwargs): show_svg(obj, **kwargs) else: - print('%%html
%s' % cgi.escape(pprint.pformat(obj))) + print('%%html
%s' % html.escape(pprint.pformat(obj))) def show_image(img, fmt='png', width='auto', height='auto'):