Convert the main dataframe to html

        :return: html data
        :rtype: str

        :example: ``ds.to_html_()``
11403
def to_html_(self) -> str:
        
        try:
            renderer = pytablewriter.HtmlTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to html")
1029842
def html(self, unicode=False):
        
        html = lxml.html.tostring(self.element, encoding=self.encoding)
        if unicode:
            html = html.decode(self.encoding)
        return html
72378
def tree_to_html(tree):
    """"""
    ul = etree.Element('ul')
    html_listify([tree], ul)
    return HTML_WRAPPER.format(etree.tostring(ul))
895381
def _repr_html_(self):
        
        # Make header.
        r = '</th><th>'.join(['Index', 'UWI', 'Data', 'Curves'])
        rows = '<tr><th>{}</th></tr>'.format(r)

        # Make rows.
        for i, w in enumerate(self.__list):
            rows += '<tr><td>{}</td>'.format(i)
            rows += '<td><strong>{}</strong></td>'.format(w.uwi)
            rows += '<td>{}&nbsp;curves</td>'.format(len(w.data))
            rows += '<td>{}</td></tr>'.format(', '.join(w.data.keys()))
        html = '<table>{}</table>'.format(rows)

        return html
1322796
def render(self):
        """"""
        return FRAME_HTML % {
            'id': self.id,
            'filename': escape(self.filename),
            'lineno': self.lineno,
            'function_name': escape(self.function_name),
            'current_line': escape(self.current_line.strip())
        }
780696
def to_html(self, codebase):
        
        html = ''
        def build_line(key, include_pred, format_fn):
            val = getattr(self, key)
            if include_pred(val):
                return '<dt>%s</dt><dd>%s</dd>\n' % (printable(key), format_fn(val))
            else:
                return ''
        def build_dependency(val):
            return ', '.join('<a href = "%s.html">%s</a>' % (trim_js_ext(name), name)
                             for name in val)
        for key in ('author', 'organization', 'version', 'license'):
            html += build_line(key, lambda val: val, lambda val: val)
        html += build_line('dependencies', lambda val: val, build_dependency)
        html += build_line('all_dependencies', lambda val: len(val) > 1, 
                                                build_dependency)
        html += codebase.build_see_html(self.see, 'h3')
        
        if html:
            return '<dl class = "module">\n%s\n</dl>\n' % html
        else:
            return ''
934542
def nb_to_html_cells(nb) -> list:
    
    html_exporter = HTMLExporter()
    html_exporter.template_file = 'basic'

    (body, resources) = html_exporter.from_notebook_node(nb)
    return BeautifulSoup(body, 'html.parser').findAll('div', class_='cell')
60811
def _repr_html_(self):
        
        # qtconsole doesn't report its line width, and also
        # behaves badly when outputting an HTML table
        # that doesn't fit the window, so disable it.
        # XXX: In IPython 3.x and above, the Qt console will not attempt to
        # display HTML, so this check can be removed when support for IPython 2.x
        # is no longer needed.

        if self._pandas and options.display.notebook_repr_widget:
            from .. import DataFrame
            from ..ui import show_df_widget
            show_df_widget(DataFrame(self._values, schema=self.schema))

        if self._pandas:
            return self._values._repr_html_()

        if in_qtconsole():
            # 'HTML output is disabled in QtConsole'
            return None

        if options.display.notebook_repr_html:
            max_rows = options.display.max_rows
            max_cols = options.display.max_columns
            show_dimensions = options.display.show_dimensions

            return self.to_html(max_rows=max_rows, max_cols=max_cols,
                                show_dimensions=show_dimensions,
                                notebook=True)
        else:
            return None
309538
def _repr_html_(self):
        
        if self._info_repr():
            buf = StringIO("")
            self.info(buf=buf)
            # need to escape the <class>, should be the first line.
            val = buf.getvalue().replace('<', r'&lt;', 1)
            val = val.replace('>', r'&gt;', 1)
            return '<pre>' + val + '</pre>'

        if get_option("display.notebook_repr_html"):
            max_rows = get_option("display.max_rows")
            max_cols = get_option("display.max_columns")
            show_dimensions = get_option("display.show_dimensions")

            return self.to_html(max_rows=max_rows, max_cols=max_cols,
                                show_dimensions=show_dimensions, notebook=True)
        else:
            return None
292846
def to_markdown_(self) -> str:
        
        try:
            renderer = pytablewriter.MarkdownTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to markdown")
674067
def to_html(self):
        
        if self.text is None:
            return

        level = self.level
        if level > 6:
            level = 6
        return '<h%s%s><a id="%s"></a>%s%s</h%s>' % (
            level,
            self.html_attributes(),
            self.element_id,
            self.html_icon(),
            self.text.to_html(),
            level)
624873
def feed(self, data):
        
        self.reset_purified()
        HTMLParser.feed(self, data)
        return self.html()
1073915
def lxml(self) -> HtmlElement:
        
        if self._lxml is None:
            try:
                self._lxml = soup_parse(self.html, features='html.parser')
            except ValueError:
                self._lxml = lxml.html.fromstring(self.raw_html)

        return self._lxml
1279893
def sheetToHTML(sheet):
    

    assert "SHEET" in str(type(sheet))
    #data,names=None,units=None,bookName=None,sheetName=None,xCol=None
    #sheet=OR.SHEET()
    data=sheet.data
    names=sheet.colDesc
    units=sheet.colUnits
    bookName=sheet.bookName
    sheetName=sheet.sheetName

    def htmlListToTR(l,trClass=None,tdClass=None,td1Class=None):
        """
        turns a list into a <tr><td>something</td></tr>
        call this when generating HTML tables dynamically.
        """
        html="<tr>"
        for item in l:
            html+="<td>%s</td>"%item
        html+="</tr>"
        if trClass:
            html=html.replace("<tr>",'<tr class="%s">'%trClass)
        if td1Class:
            html=html.replace("<td>",'<td class="%s">'%td1Class,1)
        if tdClass:
            html=html.replace("<td>",'<td class="%s">'%tdClass)
        return html

    htmlFname = os.path.expanduser("~")+"/WKS-%s.%s.html"%(bookName,sheetName)
    html="""<body>
    <style>
    body {
          background-color: #ababab;
          padding:20px;
          }
    table {
           font-size:12px;
           border-spacing: 0;
           border-collapse: collapse;
           }
    .name {background-color:#fafac8;text-align:center;}
    .units {background-color:#fafac8;text-align:center;}
    .data0 {background-color:#FFFFFF;font-family: monospace;text-align:center;}
    .data1 {background-color:#FAFAFA;font-family: monospace;text-align:center;}
    .labelRow {background-color:#e0dfe4; text-align:right;border:1px solid #000000;}
    .labelCol {background-color:#e0dfe4; text-align:center;border:1px solid #000000;  padding-left: 20px; padding-right: 20px;}
    td {
        border:1px solid #c0c0c0; padding:5px;
        font-family: Arial, Helvetica, sans-serif;
        }
    </style>
    <html>"""
    html+="<h1>FauxRigin</h1>"
    if bookName or sheetName:
        html+='<code><b>%s / %s</b></code><br><br>'%(bookName,sheetName)
    html+="<table>"
    colNames=['']
    for i in range(len(units)):
        shortName=chr(i%26+ord('A'))
        if i>=26:
            shortName=chr(int(i/26-1)+ord('A'))+shortName
        label="%s(%s)"%(shortName,"X" if sheet.colTypes[i]==3 else "Y")
        colNames.append(label)
    html+=htmlListToTR(colNames,'labelCol','labelCol')
    html+=htmlListToTR(['Long Name']+list(names),'name',td1Class='labelRow')
    html+=htmlListToTR(['Units']+list(units),'units',td1Class='labelRow')
    cutOff=False
    for y in range(len(data)):
        html+=htmlListToTR([y+1]+list(data[y]),trClass='data%d'%(y%2),td1Class='labelRow')
        if y>=200:
            cutOff=True
            break
    html+="</table>"
    html=html.replace(">nan<",">--<")
    html=html.replace(">None<","><")
    if cutOff:
        html+="<h3>... showing only %d of %d rows ...</h3>"%(y,len(data))
    html+="</body></html>"
    with open(htmlFname,'w') as f:
        f.write(html)
    import webbrowser
    webbrowser.open(htmlFname)
    return
144338
def html(self, text=TEXT):
        
        self.logger.debug("Generating the HTML report{}..."
                          .format(["", " (text only)"][text]))
        html = []
        for piece in self._pieces:
            if isinstance(piece, string_types):
                html.append(markdown2.markdown(piece, extras=["tables"]))
            elif isinstance(piece, Element):
                html.append(piece.html())
        return "\n\n".join(html)
618267
def html(self):
        
        try:
            body = self.get_elm(tag_name='body')
        except selenium_exc.NoSuchElementException:
            return None
        else:
            return body.get_attribute('innerHTML')
138873
def _data_frame(content):
    
    response = loads(content)
    key = [x for x in response.keys() if x in c.response_data][0]
    frame = DataFrame(response[key])
    final_frame = _convert(frame)
    return final_frame