Skip to content

Commit c08b89a

Browse files
committed
Updated wording for issue pandas-dev#26195
1 parent 1a18031 commit c08b89a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

doc/source/user_guide/io.rst

+5-10
Original file line numberDiff line numberDiff line change
@@ -1718,20 +1718,15 @@ at `fsimpl1`_ for implementations built into ``fsspec`` and `fsimpl2`_
17181718
for those not included in the main ``fsspec``
17191719
distribution.
17201720

1721-
You can also pass parameters directly to the backend driver. Because we can no
1722-
longer utilize the ``AWS_S3_HOST`` environment variable, we can directly define a
1721+
You can also pass parameters directly to the backend driver. Since ``fsspec`` does not
1722+
utilize the ``AWS_S3_HOST`` environment variable, we can directly define a
17231723
dictionary containing the endpoint_url and pass the object into the storage
17241724
option parameter:
17251725

17261726
.. code-block:: python
17271727
1728-
def s3so(worker_id):
1729-
worker_id = "5" if worker_id == "master" else worker_id.lstrip("gw")
1730-
return dict(client_kwargs={"endpoint_url": f"http://127.0.0.1:555{worker_id}/"})
1731-
1732-
roundtripped_df = pd.read_json(
1733-
"s3://pandas-test/test-1", compression=compression, storage_options=s3so,
1734-
)
1728+
storage_options = {"client_kwargs": {"endpoint_url": "http://127.0.0.1:5555"}}}
1729+
df = pd.read_json("s3://pandas-test/test-1", storage_options=storage_options)
17351730
17361731
More sample configurations and documentation can be found at `S3Fs documentation
17371732
<https://s3fs.readthedocs.io/en/latest/index.html?highlight=host#s3-compatible-storage>`__.
@@ -3009,7 +3004,7 @@ Read a URL with no options:
30093004
Read in the content of the "books.xml" file and pass it to ``read_xml``
30103005
as a string:
30113006

3012-
.. ipython:: python :okexcept:
3007+
.. ipython:: python
30133008
30143009
file_path = "books.xml"
30153010
with open(file_path, "w") as f:

0 commit comments

Comments
 (0)