Skip to content

Commit 38da8ca

Browse files
committed
add @doc reference for dtype_backend_options to pandas.core.generic.convert_dtypes
1 parent 35cd4fb commit 38da8ca

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pandas/core/generic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6692,6 +6692,8 @@ def infer_objects(self, copy: bool_t | None = None) -> Self:
66926692
res = self._constructor_from_mgr(new_mgr, axes=new_mgr.axes)
66936693
return res.__finalize__(self, method="infer_objects")
66946694

6695+
6696+
@doc(dtype_backend_options=_shared_docs["dtype_backend_options"])
66956697
@final
66966698
def convert_dtypes(
66976699
self,
@@ -6721,6 +6723,7 @@ def convert_dtypes(
67216723
dtypes if the floats can be faithfully casted to integers.
67226724
67236725
.. versionadded:: 1.2.0
6726+
67246727
{dtype_backend_options}
67256728
67266729
.. versionadded:: 2.0

pandas/io/html.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ def _parse_tfoot_tr(self, table):
350350
"""
351351
raise AbstractMethodError(self)
352352

353-
def _parse_tables(self, doc, match, attrs):
353+
def _parse_tables(self, dom_doc, match, attrs):
354354
"""
355355
Return all tables from the parsed DOM.
356356
357357
Parameters
358358
----------
359-
doc : the DOM from which to parse the table element.
359+
dom_doc : the DOM from which to parse the table element.
360360
361361
match : str or regular expression
362362
The text to search for in the DOM tree.
@@ -581,9 +581,9 @@ def __init__(self, *args, **kwargs) -> None:
581581

582582
self._strainer = SoupStrainer("table")
583583

584-
def _parse_tables(self, doc, match, attrs):
584+
def _parse_tables(self, dom_doc, match, attrs):
585585
element_name = self._strainer.name
586-
tables = doc.find_all(element_name, attrs=attrs)
586+
tables = dom_doc.find_all(element_name, attrs=attrs)
587587
if not tables:
588588
raise ValueError("No tables found")
589589

@@ -713,7 +713,7 @@ def _parse_td(self, row):
713713
# <thead> or <tfoot> (see _parse_thead_tr).
714714
return row.xpath("./td|./th")
715715

716-
def _parse_tables(self, doc, match, kwargs):
716+
def _parse_tables(self, dom_doc, match, kwargs):
717717
pattern = match.pattern
718718

719719
# 1. check all descendants for the given pattern and only search tables
@@ -725,7 +725,7 @@ def _parse_tables(self, doc, match, kwargs):
725725
if kwargs:
726726
xpath_expr += _build_xpath_expr(kwargs)
727727

728-
tables = doc.xpath(xpath_expr, namespaces=_re_namespace)
728+
tables = dom_doc.xpath(xpath_expr, namespaces=_re_namespace)
729729

730730
tables = self._handle_hidden_tables(tables, "attrib")
731731
if self.displayed_only:

0 commit comments

Comments
 (0)