diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index eba097cd8c345..a78af82ba4db8 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -2430,16 +2430,14 @@ Read a URL with no options: .. ipython:: python - url = "https://www.fdic.gov/bank/individual/failed/banklist.html" + url = ( + "https://raw.githubusercontent.com/pandas-dev/pandas/master/" + "pandas/tests/io/data/html/spam.html" + ) dfs = pd.read_html(url) dfs -.. note:: - - The data from the above URL changes every Monday so the resulting data above - and the data below may be slightly different. - -Read in the content of the file from the above URL and pass it to ``read_html`` +Read in the content of the "banklist.html" file and pass it to ``read_html`` as a string: .. ipython:: python diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index ba8b1a8a0679d..aed1aaedf2fa3 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -129,6 +129,7 @@ def test_to_html_compat(self): res = self.read_html(out, attrs={"class": "dataframe"}, index_col=0)[0] tm.assert_frame_equal(res, df) + @pytest.mark.xfail(reason="Html file was removed") @tm.network def test_banklist_url_positional_match(self): url = "https://www.fdic.gov/bank/individual/failed/banklist.html" @@ -142,6 +143,7 @@ def test_banklist_url_positional_match(self): assert_framelist_equal(df1, df2) + @pytest.mark.xfail(reason="Html file was removed") @tm.network def test_banklist_url(self): url = "https://www.fdic.gov/bank/individual/failed/banklist.html"