Skip to content

Commit c9eab65

Browse files
committed
read_table needs storage_options arg
1 parent 470a062 commit c9eab65

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

pandas/io/parsers/readers.py

+1
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ def read_table(
659659
low_memory=_c_parser_defaults["low_memory"],
660660
memory_map=False,
661661
float_precision=None,
662+
storage_options: StorageOptions = None,
662663
):
663664
# locals() should never be modified
664665
kwds = locals().copy()

pandas/tests/io/test_fsspec.py

+11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
read_parquet,
1414
read_pickle,
1515
read_stata,
16+
read_table,
1617
)
1718
import pandas._testing as tm
1819
from pandas.util import _test_decorators as td
@@ -122,6 +123,16 @@ def test_csv_options(fsspectest):
122123
assert fsspectest.test[0] == "csv_read"
123124

124125

126+
def test_read_table_options(fsspectest):
127+
df = DataFrame({"a": [0]})
128+
df.to_csv(
129+
"testmem://test/test.csv", storage_options={"test": "csv_write"}, index=False
130+
)
131+
assert fsspectest.test[0] == "csv_write"
132+
read_table("testmem://test/test.csv", storage_options={"test": "csv_read"})
133+
assert fsspectest.test[0] == "csv_read"
134+
135+
125136
@pytest.mark.parametrize("extension", ["xlsx", "xls"])
126137
def test_excel_options(fsspectest, extension):
127138
if extension == "xls":

0 commit comments

Comments
 (0)