MCPcopy
hub / github.com/pandas-dev/pandas / _build_doc

Method _build_doc

pandas/io/html.py:656–672  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

654 return raw_text
655
656 def _build_doc(self):
657 from bs4 import BeautifulSoup
658
659 bdoc = self._setup_build_doc()
660 if isinstance(bdoc, bytes) and self.encoding is not None:
661 udoc = bdoc.decode(self.encoding)
662 from_encoding = None
663 else:
664 udoc = bdoc
665 from_encoding = self.encoding
666
667 soup = BeautifulSoup(udoc, features="html5lib", from_encoding=from_encoding)
668
669 for br in soup.find_all("br"):
670 br.replace_with("\n" + br.text)
671
672 return soup
673
674
675def _build_xpath_expr(attrs) -> str:

Callers

nothing calls this directly

Calls 2

_setup_build_docMethod · 0.95
decodeMethod · 0.80

Tested by

no test coverage detected