Skip to content

Commit 03d38a9

Browse files
authored
Fix warning: Passing html literal strings is deprecated.
See: pandas-dev/pandas#53805 Passing html literal strings is deprecated. Wrap literal string/bytes input in ``io.StringIO``/``io.BytesIO`` instead.
1 parent 97fb1fe commit 03d38a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ISLP/models/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
"""
66
import numpy as np, pandas as pd
7+
from io import StringIO
78

89
from .model_spec import (ModelSpec,
910
Column,
@@ -46,7 +47,7 @@ def summarize(results,
4647
4748
"""
4849
tab = results.summary().tables[1]
49-
results_table = pd.read_html(tab.as_html(),
50+
results_table = pd.read_html(StringIO(tab.as_html()),
5051
index_col=0,
5152
header=0)[0]
5253
if not conf_int:

0 commit comments

Comments
 (0)