Skip to content

Commit c98e083

Browse files
authored
DOC: Fix IPython prompts in io.rst (#60704)
1 parent 18dbceb commit c98e083

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

doc/source/user_guide/io.rst

+11-7
Original file line numberDiff line numberDiff line change
@@ -2340,6 +2340,7 @@ Read a URL with no options:
23402340
.. code-block:: ipython
23412341
23422342
In [320]: url = "https://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list"
2343+
23432344
In [321]: pd.read_html(url)
23442345
Out[321]:
23452346
[ Bank NameBank CityCity StateSt ... Acquiring InstitutionAI Closing DateClosing FundFund
@@ -2366,6 +2367,7 @@ Read a URL while passing headers alongside the HTTP request:
23662367
.. code-block:: ipython
23672368
23682369
In [322]: url = 'https://www.sump.org/notes/request/' # HTTP request reflector
2370+
23692371
In [323]: pd.read_html(url)
23702372
Out[323]:
23712373
[ 0 1
@@ -2378,14 +2380,16 @@ Read a URL while passing headers alongside the HTTP request:
23782380
1 Host: www.sump.org
23792381
2 User-Agent: Python-urllib/3.8
23802382
3 Connection: close]
2383+
23812384
In [324]: headers = {
2382-
In [325]: 'User-Agent':'Mozilla Firefox v14.0',
2383-
In [326]: 'Accept':'application/json',
2384-
In [327]: 'Connection':'keep-alive',
2385-
In [328]: 'Auth':'Bearer 2*/f3+fe68df*4'
2386-
In [329]: }
2387-
In [340]: pd.read_html(url, storage_options=headers)
2388-
Out[340]:
2385+
.....: 'User-Agent':'Mozilla Firefox v14.0',
2386+
.....: 'Accept':'application/json',
2387+
.....: 'Connection':'keep-alive',
2388+
.....: 'Auth':'Bearer 2*/f3+fe68df*4'
2389+
.....: }
2390+
2391+
In [325]: pd.read_html(url, storage_options=headers)
2392+
Out[325]:
23892393
[ 0 1
23902394
0 Remote Socket: 51.15.105.256:51760
23912395
1 Protocol Version: HTTP/1.1

0 commit comments

Comments
 (0)