Skip to content

Commit e64fca0

Browse files
Merge branch 'main' into add_op
2 parents 0319203 + 1fd184d commit e64fca0

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

pandas/io/feather_format.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
from pandas._libs import lib
1414
from pandas.compat._optional import import_optional_dependency
1515
from pandas.errors import Pandas4Warning
16-
from pandas.util._decorators import (
17-
doc,
18-
set_module,
19-
)
16+
from pandas.util._decorators import set_module
2017
from pandas.util._validators import check_dtype_backend
2118

2219
from pandas.core.api import DataFrame
23-
from pandas.core.shared_docs import _shared_docs
2420

2521
from pandas.io._util import arrow_table_to_pandas
2622
from pandas.io.common import get_handle
@@ -40,7 +36,6 @@
4036
)
4137

4238

43-
@doc(storage_options=_shared_docs["storage_options"])
4439
def to_feather(
4540
df: DataFrame,
4641
path: FilePath | WriteBuffer[bytes],
@@ -54,7 +49,15 @@ def to_feather(
5449
----------
5550
df : DataFrame
5651
path : str, path object, or file-like object
57-
{storage_options}
52+
storage_options : dict, optional
53+
Extra options that make sense for a particular storage connection, e.g.
54+
host, port, username, password, etc. For HTTP(S) URLs the key-value pairs
55+
are forwarded to ``urllib.request.Request`` as header options. For other
56+
URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are
57+
forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more
58+
details, and for more examples on storage options refer `here
59+
<https://pandas.pydata.org/docs/user_guide/io.html?
60+
highlight=storage_options#reading-writing-remote-files>`_.
5861
**kwargs :
5962
Additional keywords passed to `pyarrow.feather.write_feather`.
6063
@@ -72,7 +75,6 @@ def to_feather(
7275

7376

7477
@set_module("pandas")
75-
@doc(storage_options=_shared_docs["storage_options"])
7678
def read_feather(
7779
path: FilePath | ReadBuffer[bytes],
7880
columns: Sequence[Hashable] | None = None,
@@ -102,7 +104,15 @@ def read_feather(
102104
If not provided, all columns are read.
103105
use_threads : bool, default True
104106
Whether to parallelize reading using multiple threads.
105-
{storage_options}
107+
storage_options : dict, optional
108+
Extra options that make sense for a particular storage connection, e.g.
109+
host, port, username, password, etc. For HTTP(S) URLs the key-value pairs
110+
are forwarded to ``urllib.request.Request`` as header options. For other
111+
URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are
112+
forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more
113+
details, and for more examples on storage options refer `here
114+
<https://pandas.pydata.org/docs/user_guide/io.html?
115+
highlight=storage_options#reading-writing-remote-files>`_.
106116
107117
dtype_backend : {{'numpy_nullable', 'pyarrow'}}
108118
Back-end data type applied to the resultant :class:`DataFrame`

pandas/tests/apply/test_series_apply.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ def test_apply_to_timedelta(by_row):
545545
)
546546
def test_apply_listlike_reducer(string_series, ops, names, how, kwargs):
547547
# GH 39140
548-
expected = Series({name: op(string_series) for name, op in zip(names, ops)})
548+
expected = Series(
549+
{name: op(string_series) for name, op in zip(names, ops, strict=True)}
550+
)
549551
expected.name = "series"
550552
result = getattr(string_series, how)(ops, **kwargs)
551553
tm.assert_series_equal(result, expected)

pandas/tests/computation/test_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ def test_attr_expression(self):
11971197
expec3 = df.a + df.b + df.c[df.b < 0]
11981198
exprs = expr1, expr2, expr3
11991199
expecs = expec1, expec2, expec3
1200-
for e, expec in zip(exprs, expecs):
1200+
for e, expec in zip(exprs, expecs, strict=True):
12011201
tm.assert_series_equal(expec, self.eval(e, local_dict={"df": df}))
12021202

12031203
def test_assignment_fails(self):

0 commit comments

Comments
 (0)