Skip to content

Commit 01e4959

Browse files
committed
Added FUTURE_INFER_STRING catch, edited documentation
1 parent 5380aba commit 01e4959

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Other enhancements
200200
- :class:`Holiday` has gained the constructor argument and field ``exclude_dates`` to exclude specific datetimes from a custom holiday calendar (:issue:`54382`)
201201
- :class:`Rolling` and :class:`Expanding` now support ``nunique`` (:issue:`26958`)
202202
- :class:`Rolling` and :class:`Expanding` now support aggregations ``first`` and ``last`` (:issue:`33155`)
203-
- :class:`StringDtype` now supports addition to Series/DataFrame with floats, ints, and strings (:issue:`61581`)
203+
- :class:`StringDtype` now supports addition to Series/DataFrame with floats, ints, and strings(Only for future string) (:issue:`61581`)
204204
- :func:`read_parquet` accepts ``to_pandas_kwargs`` which are forwarded to :meth:`pyarrow.Table.to_pandas` which enables passing additional keywords to customize the conversion to pandas, such as ``maps_as_pydicts`` to read the Parquet map data type as python dictionaries (:issue:`56842`)
205205
- :meth:`.DataFrameGroupBy.transform`, :meth:`.SeriesGroupBy.transform`, :meth:`.DataFrameGroupBy.agg`, :meth:`.SeriesGroupBy.agg`, :meth:`.SeriesGroupBy.apply`, :meth:`.DataFrameGroupBy.apply` now support ``kurt`` (:issue:`40139`)
206206
- :meth:`DataFrame.apply` supports using third-party execution engines like the Bodo.ai JIT compiler (:issue:`60668`)

pandas/tests/arrays/floating/test_arithmetic.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,14 @@ def test_error_invalid_values(data, all_arithmetic_operators):
154154

155155
# invalid array-likes
156156
str_ser = pd.Series("foo", index=s.index)
157-
if all_arithmetic_operators in [
158-
"__add__",
159-
"__radd__",
160-
]:
157+
if (
158+
all_arithmetic_operators
159+
in [
160+
"__add__",
161+
"__radd__",
162+
]
163+
and pd.options.future.infer_string
164+
):
161165
res = ops(str_ser)
162166
if all_arithmetic_operators == "__radd__":
163167
data_expected = []

pandas/tests/arrays/integer/test_arithmetic.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,14 @@ def test_error_invalid_values(data, all_arithmetic_operators):
197197
# assert_almost_equal stricter, but the expected with pd.NA seems
198198
# more-correct than np.nan here.
199199
tm.assert_series_equal(res, expected)
200-
elif all_arithmetic_operators in [
201-
"__add__",
202-
"__radd__",
203-
]:
200+
elif (
201+
all_arithmetic_operators
202+
in [
203+
"__add__",
204+
"__radd__",
205+
]
206+
and pd.options.future.infer_string
207+
):
204208
res = ops(str_ser)
205209
if all_arithmetic_operators == "__radd__":
206210
expected = pd.Series(

0 commit comments

Comments
 (0)