Skip to content

Commit b8a582c

Browse files
committed
Fixing unit tests and documentation issues
1 parent 2c848ac commit b8a582c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/io/xml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ def read_xml(
10731073
... </row>
10741074
... </data>'''
10751075
1076-
>>> df = pd.read_xml(StringIO(xml))
1076+
>>> df = pd.read_xml(io.StringIO(xml))
10771077
>>> df
10781078
shape degrees sides
10791079
0 square 360 4.0
@@ -1087,7 +1087,7 @@ def read_xml(
10871087
... <row shape="triangle" degrees="180" sides="3.0"/>
10881088
... </data>'''
10891089
1090-
>>> df = pd.read_xml(StringIO(xml), xpath=".//row")
1090+
>>> df = pd.read_xml(io.StringIO(xml), xpath=".//row")
10911091
>>> df
10921092
shape degrees sides
10931093
0 square 360 4.0
@@ -1113,7 +1113,7 @@ def read_xml(
11131113
... </doc:row>
11141114
... </doc:data>'''
11151115
1116-
>>> df = pd.read_xml(StringIO(xml),
1116+
>>> df = pd.read_xml(io.StringIO(xml),
11171117
... xpath="//doc:row",
11181118
... namespaces={{"doc": "https://example.com"}})
11191119
>>> df

pandas/tests/io/xml/test_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def test_literal_xml_deprecation():
257257
)
258258

259259
with tm.assert_produces_warning(FutureWarning, match=msg):
260-
read_xml(xml_default_nmsp, parser="etree")
260+
read_xml(xml_default_nmsp)
261261

262262

263263
@pytest.fixture(params=["rb", "r"])

0 commit comments

Comments
 (0)