Skip to content

Commit ff6c88d

Browse files
committed
Updates for CR: frame and array equality checks, whatsnew.
1 parent 02c9558 commit ff6c88d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/source/whatsnew/v1.3.2.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Fixed regressions
2323
- Fixed regression where :meth:`pandas.read_csv` raised a ``ValueError`` when parameters ``names`` and ``prefix`` were both set to None (:issue:`42387`)
2424
- Fixed regression in comparisons between :class:`Timestamp` object and ``datetime64`` objects outside the implementation bounds for nanosecond ``datetime64`` (:issue:`42794`)
2525
- Fixed regression in :meth:`.Styler.highlight_min` and :meth:`.Styler.highlight_max` where ``pandas.NA`` was not successfully ignored (:issue:`42650`)
26+
- Fixed regression in :meth:`pandas.concat` where copy=False was not honored in ``axis=1`` Series concatenation. (:issue:42501).
2627

2728
.. ---------------------------------------------------------------------------
2829

pandas/tests/frame/methods/test_astype.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -751,5 +751,8 @@ def construct_array_type(cls):
751751

752752
def test_frame_astype_no_copy():
753753
# GH 42501
754-
df = DataFrame({"col": [1, 4, None, 5]}, dtype=object)
755-
df = df.astype({"col": Int16DtypeNoCopy()}, copy=False)
754+
df = DataFrame({"a": [1, 4, None, 5], "b": [6, 7, 8, 9]}, dtype=object)
755+
result = df.astype({"a": Int16DtypeNoCopy()}, copy=False)
756+
757+
tm.assert_frame_equal(df, result, check_dtype=False)
758+
tm.assert_numpy_array_equal(df.b.values, result.b.values, check_same="same")

0 commit comments

Comments
 (0)